31 lines
1.0 KiB
Plaintext
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 %>
|
|
<%= " - #{m.eaten_at.time}" %>
|
|
<%= 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 " #{i.amount} " } %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tr>
|