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.
body_tracking/app/views/meals/_show.html.erb
2020-04-19 16:03:03 +02:00

31 lines
1.0 KiB
Plaintext

<tr id="meal-<%= m.id %>" class="primary meal project idnt idnt-1">
<td class="name" colspan="2">
<b><%= "#{t '.label_meal'} ##{index+1}" %></b>
<% if m.eaten_at %>
<%= " at #{m.eaten_at.strftime('%R')}" %>
<%= link_to '', toggle_eaten_meal_path(m),
{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"} %>
<% end %>
<%= link_to l(:button_note), note_meal_path(m),
{remote: true, class: "icon icon-wiki-page"} %>
<div style="float: right; position: relative;">
<%= meal_links(m) %>
</div>
</td>
</tr>
<% m.ingredients.each do |i| %>
<tr id="ingredient-<%= i.id %>" class="ingredient project idnt idnt-2 buttonable">
<td class="name unwrappable" style="width: 5%;">
<%= i.food.name %>
</td>
<td style="text-align: left;" class="unwrappable">
<%= adjust_ingredient_links(i) { raw "&emsp;#{i.amount}&emsp;" } %>
</td>
</tr>
<% end %>
</tr>