foodsoft/app/views/finance/transactions/_list.rhtml

41 lines
No EOL
1 KiB
Text

<% if @total == 0 %>
<p>Keine gefunden</p>
<% else %>
<p>Anzahl gefundener Transaktionen: <b><%= @total %></b></p>
<p>
<%= pagination_links_remote @financial_transactions, @per_page, {:sort => params[:sort], :query => params['query']}%>
</p>
<table>
<thead>
<tr>
<td <%= sort_td_class_helper "date" %>>
<%= sort_link_helper "Datum", "date" %>
</td>
<td>Wer</td>
<td <%= sort_td_class_helper "note" %>>
<%= sort_link_helper "Notiz", "note" %>
</td>
<td <%= sort_td_class_helper "amount" %>>
<%= sort_link_helper "Betrag", "amount" %>
</td>
</tr>
</thead>
<tbody>
<% @financial_transactions.each do |t| %>
<tr class="<%= cycle("even","odd") %>">
<td><%= format_time(t.created_on) %></td>
<td><%=h t.user.nil? ? '??' : t.user.nick %></td>
<td><%=h t.note %></td>
<td style="color:<%= t.amount < 0 ? 'red' : 'black' %>; width:5em" class="currency"><%= number_to_currency(t.amount) %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>