%= render partial: 'quantities/filters', locals: {url: filter_project_quantities_path(@project)} %> <% if @quantities.any? { |q| q.persisted? } %>
<%= l(:field_name) %> | <%= l(:field_order) %> | <%= l(:field_domain) %> | <%= l(:field_description) %> | <%= l(:field_formula) %> | <%= l(:field_action) %> |
---|---|---|---|---|---|
<%= q.name %>
|
<% [:up, :down, :left, :right].each do |direction| %> <%= if q.movable?(direction) link_to '', move_quantity_path(q, direction), { remote: true, method: :post, class: "icon icon-move icon-move-#{direction}" } else link_to '', '', {class: "icon", style: "visibility: hidden;"} end %> <% end %> | <%= q.domain %> | <%= q.description %> | <%= checked_image q.formula? %> | <%= link_to l(:button_edit), edit_quantity_path(q), { remote: true, class: "icon icon-edit" } %> <%= delete_link quantity_path(q), {remote: true, data: {}} %> |
<%= labelled_form_for @quantity,
url: quantity_path(@quantity),
method: :patch, remote: true,
html: {id: 'quantity-edit-form', name: 'quantity-edit-form'} do |f| %>
<%= render partial: 'quantities/form', locals: {f: f} %>
<%= submit_tag l(:button_save) %> <%= link_to l(:button_cancel), "#", onclick: '$(this).closest("tr").remove(); return false;' %> |
<%= l(:label_no_data) %>
<% end %>