Coloring index summaries
This commit is contained in:
parent
dafebdc529
commit
54fc7ecf7e
@ -31,9 +31,11 @@
|
||||
<% end %>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="date" colspan="2">
|
||||
<h3><%= date == Date.current ? 'Today' : date.strftime('%F') %></h3>
|
||||
<tr style="border: solid 2px #d9ead3;">
|
||||
<td class="date" colspan="2" style="background-color: #d9ead3;">
|
||||
<h3 style="margin: 0;">
|
||||
<%= date == Date.current ? 'Today' : date.strftime('%F') %>
|
||||
</h3>
|
||||
</td>
|
||||
<td class="value ellipsible"></td>
|
||||
<% @quantities.each do |q| %>
|
||||
@ -45,8 +47,12 @@
|
||||
</tr>
|
||||
|
||||
<% meals.each_with_index do |m, index| %>
|
||||
<%= render partial: 'meals/show', locals: {m: m, index: index} %>
|
||||
<%= render partial: 'meals/show', locals: {
|
||||
m: m, index: index,
|
||||
color: cycle('#d0e0e3', '#c9daf8', '#cfe2f3', '#d9d2e9', '#ead1dc')
|
||||
} %>
|
||||
<% end %>
|
||||
<% reset_cycle %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<tr id="meal-<%= m.id %>" class="primary meal project idnt idnt-1 odd">
|
||||
<td class="name unwrappable">
|
||||
<tr id="meal-<%= m.id %>" class="primary meal project idnt idnt-1"
|
||||
style="border: solid 2px <%= color %>;">
|
||||
<td class="name unwrappable" style="background-color: <%= color %>;">
|
||||
<b><%= "#{t '.label_meal'} ##{index+1}" %></b>
|
||||
<% if m.eaten_at %>
|
||||
<%= " at #{m.eaten_at.strftime('%R')}" %>
|
||||
|
@ -31,7 +31,7 @@ table.list td.form {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table#meals, table#meals tr:not(.meal) td {border: none;}
|
||||
table#meals, table#meals td {border: none;}
|
||||
|
||||
fieldset#filters table.filter td {padding-left: 8px;}
|
||||
|
||||
|
Reference in New Issue
Block a user