1
0

Quantity destruction destroys dependent

Table data aligned.
Primary quantities highlighted.
This commit is contained in:
cryptogopher
2019-10-25 22:46:11 +02:00
parent c0e3fd2e85
commit baadd647f8
6 changed files with 16 additions and 10 deletions

View File

@@ -35,13 +35,17 @@
</thead>
<tbody>
<% Quantity.each_with_level(@quantities) do |q, level| %>
<% next if q.new_record? %>
<tr id="quantity-<%= q.id %>"
class="quantity <%= "project idnt idnt-#{level}" if level > 0 %>">
<%
next if q.new_record?
quantity_class = "quantity"
quantity_class += " project idnt idnt-#{level}" if level > 0
quantity_class += " primary" if q.primary
%>
<tr id="quantity-<%= q.id %>" class="<%= quantity_class %>">
<td class="name"><span><%= q.name %></span></td>
<td class="domain"><%= q.domain %></td>
<td class="description"><%= q.description %></td>
<td><%= delete_link quantity_path(q), data: {} %></td>
<td class="action"><%= delete_link quantity_path(q), data: {} %></td>
</tr>
<% end %>
</tbody>