Manuel Bustillo b7cabc1661
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 3m21s
Run unit tests / unit_tests (pull_request) Successful in 2m49s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 31m54s
Add copyright notice
2024-10-27 21:42:45 +00:00

31 lines
668 B
Plaintext

<%# Copyright (C) 2024 Manuel Bustillo %>
<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 %>