diff --git a/app/views/meals/_index.html.erb b/app/views/meals/_index.html.erb index 7056d4c..cfe3361 100644 --- a/app/views/meals/_index.html.erb +++ b/app/views/meals/_index.html.erb @@ -10,14 +10,12 @@ <% total_width = 4 + @quantities.length %> <% @meals_by_date.reverse_each do |date, meals| %> - -

<%= date == Date.current ? 'Today' : date.strftime('%F') %>

- + <%= l(:field_amount) %> <% @quantities.each do |q| %> - <%= q.name %> @@ -26,15 +24,24 @@ - - <%= "[#{@amount_mfu_unit.shortname}]" %> - + <%= "[#{@amount_mfu_unit.shortname}]" %> <% @quantities.each do |q| %> - - <% mfu_unit = @nutrients[q][:mfu_unit] %> - <%= "[#{mfu_unit ? mfu_unit.shortname : '-'}]" %> + <% mfu_unit = @nutrients[q][:mfu_unit] %> + <%= "[#{mfu_unit ? mfu_unit.shortname : '-'}]" %> + <% end %> + + + + +

<%= date == Date.current ? 'Today' : date.strftime('%F') %>

+ + + <% @quantities.each do |q| %> + + <%= format_value(@nutrient_summary[q][date], @nutrients[q][:precision]) %> <% end %> + <% meals.each_with_index do |m, index| %> diff --git a/app/views/meals/_show.html.erb b/app/views/meals/_show.html.erb index 277a45c..acc8b4b 100644 --- a/app/views/meals/_show.html.erb +++ b/app/views/meals/_show.html.erb @@ -32,7 +32,7 @@ <%= notes(m) %> <% end %> - + <% @quantities.each do |q| %> <%= format_value(@nutrient_summary[q][m], @nutrients[q][:precision]) %>