29 lines
625 B
Plaintext
29 lines
625 B
Plaintext
<p style="color: green"><%= notice %></p>
|
|
|
|
<h1>Expenses</h1>
|
|
|
|
<div id="expenses">
|
|
<table>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Amount</th>
|
|
<th colspan="2"></th>
|
|
</tr>
|
|
<% @expenses.each do |expense| %>
|
|
<tr>
|
|
<td><%= expense.name %></td>
|
|
<td><%= expense.amount.to_currency %></td>
|
|
<td><%= link_to "Show", expense %></td>
|
|
<td><%= link_to "Edit", edit_expense_path(expense) %></td>
|
|
</tr>
|
|
<% end %>
|
|
<tr>
|
|
<td>Total</td>
|
|
<td><%= @expenses.sum(&:amount).to_currency %></td>
|
|
<td colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<%= link_to "New expense", new_expense_path %>
|