1
0

Replaced Quantity 'primary' attr with ColumnView model

This commit is contained in:
cryptogopher
2019-12-14 23:56:36 +01:00
parent ccf26d1830
commit 0c0ca1d286
19 changed files with 91 additions and 65 deletions

View File

@@ -13,5 +13,4 @@
<p><%= f.text_field :description, style: "width: 100%;" %></p>
<p><%= f.text_field :formula, placeholder: t('.formula_placeholder'),
style: "width: 100%;" %></p>
<p><%= f.check_box :primary %></p>
</div>

View File

@@ -19,18 +19,9 @@
next if q.new_record?
quantity_class = "quantity"
quantity_class += " project idnt idnt-#{level+1}"
quantity_class += " primary" if q.primary
%>
<tr id="quantity-<%= q.id %>" class="<%= quantity_class %>">
<td class="name">
<%= link_to '', toggle_quantity_path(q), {
remote: true,
method: :post,
class: "icon #{q.primary ? "icon-fav" : "icon-fav-off"}"
}
%>
<%= q.name %>
</td>
<td class="name"><%= q.name %></td>
<td class="order">
<% [:up, :down, :left, :right].each do |direction| %>
<%=