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

41 lines
1 KiB
Text
Raw Normal View History

2009-01-06 11:49:19 +01:00
<% if @total == 0 %>
<p>Keine gefunden</p>
<% else %>
<p>Anzahl gefundener Transaktionen: <b><%= @total %></b></p>
<p>
<%= pagination_links_remote @financial_transactions, :params => {:sort => params[:sort], :query => params['query']}%>
2009-01-06 11:49:19 +01:00
</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 %>