1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/app/views/ingredients/_options.html.erb
2019-11-02 23:59:19 +01:00

32 lines
1.0 KiB
Plaintext

<fieldset id="options" class="collapsible">
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
<%= form_tag toggle_nutrient_column_project_ingredients_path(@project),
id: 'add_nutrient_column', method: :post, remote: true do %>
<table>
<tr>
<td style="width:100%"></td>
<td>
<%= select_tag 'id', nutrient_column_options %>
</td>
<td>
<%= submit_tag l(:button_add) %>
</td>
</tr>
</table>
<% end %>
</fieldset>
<table class="list" style="border:none; width:100%">
<tr>
<% total_width = 3 + @primary_quantities.length %>
<td style="visibility: hidden; border: none; width:<%= 3 * 100/total_width%>%"></td>
<% @primary_quantities.each do |q| %>
<td class="action" style="width:<%= 100/total_width %>%">
<%= link_to l(:button_hide),
toggle_nutrient_column_project_ingredients_path(@project, id: q.id),
{class: "icon icon-close", method: :post, remote: true} %>
</td>
<% end %>
</tr>
</table>