diff --git a/app/views/ingredients/nutrients.html.erb b/app/views/ingredients/nutrients.html.erb index 411bad6..64a39ca 100644 --- a/app/views/ingredients/nutrients.html.erb +++ b/app/views/ingredients/nutrients.html.erb @@ -43,7 +43,7 @@ - + <%= 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" @@ -57,6 +57,7 @@ <% end %> + <% @primary_quantities.each do |q| %> <%= values[q.id] || '-' %> @@ -67,26 +68,26 @@ <% extras = @extra_nutrients[i].keys %> <% extras.each_slice(@primary_quantities.length).with_index do |names, index| %> - <% if index == 0 %> - - - <% end %> + <% names.each do |name| %> <%= name %> <% end %> <% if @primary_quantities.length > names.length %> - + <% end %> + <% names.each do |name| %> <%= @extra_nutrients[i][name] %> <% end %> + <% if @primary_quantities.length > names.length %> + + <% end %> <% end %> diff --git a/assets/stylesheets/body_tracking.css b/assets/stylesheets/body_tracking.css index c5639d6..e5e30bb 100644 --- a/assets/stylesheets/body_tracking.css +++ b/assets/stylesheets/body_tracking.css @@ -1,7 +1,7 @@ table.list tr.quantity.primary td.name {font-weight: bold;} table.nutrients.list td.name, table.nutrients.list td.quantity {text-align: left; border-bottom: none;} -table.nutrients.list td.space, +table.nutrients.list td.space {border-top: none; border-bottom: none;} table.nutrients.list td.value {border-top: none;} table.list tr.ingredient.hidden {opacity: 0.4} table.list td.action,