1
0

Displaying only quantities for current project

This commit is contained in:
cryptogopher
2019-09-08 23:50:22 +02:00
parent d74b721ee5
commit ddac5d9aa8
3 changed files with 5 additions and 5 deletions

View File

@@ -23,7 +23,7 @@
</div>
<h2><%= t ".heading" %></h2>
<% if Quantity.roots.any? %>
<% if @quantities.any? %>
<table class="list">
<thead>
<tr>
@@ -34,8 +34,7 @@
</tr>
</thead>
<tbody>
<% Quantity.roots.each do |r| %>
<% Quantity.each_with_level(r.self_and_descendants) do |q, level| %>
<% Quantity.each_with_level(@quantities) do |q, level| %>
<tr id="quantity-<%= q.id %>"
class="quantity <%= "project idnt idnt-#{level}" if level > 0 %>">
<td class="name"><span><%= q.name %></span></td>
@@ -44,7 +43,6 @@
<td><%= delete_link quantity_path(q), data: {} %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<% else %>