diff --git a/app/helpers/meals_helper.rb b/app/helpers/meals_helper.rb index f4e10de..835aaf5 100644 --- a/app/helpers/meals_helper.rb +++ b/app/helpers/meals_helper.rb @@ -17,8 +17,8 @@ module MealsHelper end def display_notes(m) + content_tag(:span, m.notes) + link_to(l(:button_notes), edit_notes_meal_path(m), - {remote: true, class: "icon icon-wiki-page"}) + - content_tag(:span, m.notes.blank? ? "" : ": #{m.notes}") + {remote: true, class: "icon icon-wiki-page", style: "float: right"}) end end diff --git a/app/views/meals/_form.html.erb b/app/views/meals/_form.html.erb index 53d8c71..35c9400 100644 --- a/app/views/meals/_form.html.erb +++ b/app/views/meals/_form.html.erb @@ -2,6 +2,8 @@
<%= f.text_field :notes, required: false, style: "width: 95%;" %>
+ <% @meal.ingredients.each_with_index do |i, index| %>
<%= date == Date.current ? 'Today' : date.strftime('%F') %> |
||||
+ | ||||
<%= "#{t '.label_meal'} ##{index+1}" %> <% if m.eaten_at %> <%= " at #{m.eaten_at.strftime('%R')}" %> @@ -7,13 +7,13 @@ {remote: true, method: :post, class: "icon icon-close"} %> <% else %> <%= link_to l(:button_eat), toggle_eaten_meal_path(m), - {remote: true, method: :post, class: "icon icon-ok"} %> + {remote: true, method: :post, class: "icon icon-time"} %> <% end %> - | - <%= display_notes(m) %> - | -<%= meal_links(m) %> | ++ <%= display_notes(m) %> + | +<%= meal_links(m) %> |