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.
cryptogopher f00f93c9e9 View tracking through params in Ingredients
Squeezed ingredient form
2020-04-04 02:13:46 +02:00

46 lines
1.6 KiB
Plaintext

<%= render partial: 'ingredients/filters',
locals: {url: filter_project_ingredients_path(@project, view: :index)} %>
<% if @ingredients.any? { |i| i.persisted? } %>
<%= error_messages_for @formula_q.formula if @formula_q %>
<table class="list">
<thead>
<tr>
<th style="width:50%"><%= l(:field_name) %></th>
<th><%= l(:field_notes) %></th>
<th><%= l(:field_reference) %></th>
<th><%= l(:field_group) %></th>
<th><%= l(:field_source) %></th>
<th style="width:5%"><%= l(:field_action) %></th>
</tr>
</thead>
<tbody>
<% @ingredients.each do |i| %>
<% next if i.new_record? %>
<tr id="ingredient-<%= i.id %>"
class="ingredient primary<%= ' hidden' if i.hidden %>">
<td class="name ellipsible">
<%= link_to '', toggle_ingredient_path(i), {
remote: true,
method: :post,
class: "icon icon-eye"
} %>
<%= i.name %>
</td>
<td class="notes ellipsible"><%= i.notes %></td>
<td class="reference value"><%= i.ref_amount %> [<%= i.ref_unit.shortname %>]</td>
<td class="group"><%= i.group %></td>
<td class="source">
<%= i.source.name if i.source.present? %>
<%= ", #{i.source_ident}" if i.source_ident.present? %>
</td>
<td class="action unwrappable"><%= action_links(i, :index) %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>