% content_for :sidebar do %>
<%= render :partial => 'body_trackers/sidebar' %>
<% end %>
<%= link_to t(".heading_ingredient_list"), project_ingredients_path(@project),
:class => 'icon icon-list' %>
<%= render :partial => 'ingredients/contextual' %>
<%= render :partial => 'ingredients/import' %>
<%= render :partial => 'ingredients/form' %>
<%= t ".heading" %>
<% if @primary_nutrients.any? %>
<%= l(:field_name) %> |
<% @primary_quantities.each do |q| %>
<%= q.name %> |
<% end %>
<% @primary_nutrients.each do |i, values| %>
<% row_class = "ingredient#{' hidden' if i.hidden} #{cycle('odd', 'even')}" %>
<%= link_to '', '#', {
onclick: "$(this).closest('tr').toggle(); $(this).closest('tr').nextUntil('tr.primary', 'tr').toggle(); return false;",
class: "icon icon-bullet-closed"
} %>
<%= i.name %>
|
<% @primary_quantities.each do |q| %>
<%= values[q.id] || '-' %>
|
<% end %>
<%= link_to '', '#', {
onclick: "$(this).closest('tr').prev('tr.primary').toggle(); $(this).closest('tr').prev('tr.primary').nextUntil('tr.primary', 'tr').toggle(); return false;",
class: "icon icon-bullet-open"
} %>
<%= i.name %>
|
<% @primary_quantities.each do |q| %>
<%= q.name %>
|
<% end %>
|
<% @primary_quantities.each do |q| %>
<%= values[q.id] || '-' %>
|
<% end %>
<% extras = @extra_nutrients[i].keys %>
<% extras.each_slice(@primary_quantities.length).with_index do |names, index| %>
<% end %>
<% end %>
<% else %>
<%= l(:label_no_data) %>
<% end %>