46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
<tr id="meal-<%= m.id %>" class="primary meal project idnt idnt-1"
|
|
style="background-color: #d0e0e3;">
|
|
<td class="name unwrappable" style="border-right: none;">
|
|
<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-time"} %>
|
|
<% end %>
|
|
</td>
|
|
|
|
<td id="notes-links-<%= m.id %>" class="unwrappable"
|
|
style="text-align: left; border-left: none; border-right: none; width: 1%;">
|
|
<%= link_to l(:button_cancel), '', class: 'icon icon-cancel', style: 'display: none;',
|
|
onclick: "$(event.target).closest('tr').find('form').remove();
|
|
$('td[id=notes-#{m.id}]').contents().show();
|
|
$('td[id=notes-links-#{m.id}] a').toggle();
|
|
return false;" %>
|
|
|
|
<%= link_to l(:button_save), '', class: 'icon icon-save', style: 'display: none;',
|
|
onclick: "$(event.target).closest('tr').find('form').submit(); return false;" %>
|
|
|
|
<%= link_to l(:button_notes), edit_notes_meal_path(m), remote: true,
|
|
class: "icon icon-wiki-page" %>
|
|
</td>
|
|
|
|
<% if false %>
|
|
<td id="notes-<%= m.id %>" class="notes unwrappable" colspan="<%= @quantities.length + 1 %>"
|
|
style="text-align: left; border-left: none;">
|
|
<%= notes(m) %>
|
|
</td>
|
|
<% end %>
|
|
|
|
<td class="value ellipsible" style="border-left: none;"></td>
|
|
<% @quantities.each do |q| %>
|
|
<td class="value ellipsible">
|
|
<%= format_value(@ingredient_summary[m][q], @ingredient_summary[:precision][q]) %>
|
|
</td>
|
|
<% end %>
|
|
|
|
<td class="action unwrappable" style="width: 1%;"><%= meal_links(m) %></td>
|
|
</tr>
|