1
0

Meals index, WIP

This commit is contained in:
cryptogopher
2020-04-18 18:29:53 +02:00
parent 3ff36df168
commit 50b89de904
10 changed files with 90 additions and 55 deletions

View File

@@ -27,35 +27,11 @@
<%= q.name %>
</div>
</td>
<td class="order">
<% [: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 %>
</td>
<td class="order"><%= order_links(q) %></td>
<td class="domain"><%= q.domain %></td>
<td class="description"><%= q.description %></td>
<td class="formula"><%= checked_image q.formula %></td>
<td class="action unwrappable">
<%= link_to l(:button_child), new_child_quantity_path(q), {
remote: true,
class: "icon icon-add"
} %>
<%= link_to l(:button_edit), edit_quantity_path(q), {
remote: true,
class: "icon icon-edit"
} %>
<%= delete_link quantity_path(q), {remote: true, data: {}} %>
</td>
<td class="action unwrappable"><%= action_links(q) %></td>
</tr>
<% end %>
</tbody>