Moved financial_transaction into the new finance-namespace.
This commit is contained in:
parent
1d85b880f2
commit
c282cae79c
19 changed files with 167 additions and 153 deletions
41
app/views/finance/transactions/_list.rhtml
Normal file
41
app/views/finance/transactions/_list.rhtml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<% 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 %>
|
||||
Loading…
Add table
Add a link
Reference in a new issue