schmeckels/views/transactions.tpl
2020-03-05 23:52:33 +01:00

28 lines
902 B
Smarty

% rebase("base.tpl")
<table class="table-auto">
<thead>
<tr>
<th class="px-4 py-2">Date</th>
<th class="px-4 py-2">Sender/Empfänger</th>
<th class="px-4 py-2">Verwendungszweck</th>
<th class="px-4 py-2">Betrag</th>
<th class="px-4 py-2">Kategorie</th>
</tr>
</thead>
<tbody>
% for t in transactions:
<tr>
<td class="border px-4 py-2">{{ t.get_date("de") }}</td>
<td class="border px-4 py-2">{{ t.name }}</td>
<td class="border px-4 py-2">{{ t.description }}</td>
<td class="border px-4 py-2 {{ 'text-green-500' if t.is_positive() else 'text-red-500' }}">{{ t.pretty_amount() }}</td>
% if t.category:
<td class="border px-4 py-2"> <a href="/category/{{ t.category.name }}"> {{ t.category.full_name()}}</a></td>
% else:
<td class="border px-4 py-2"> - </td>
% end
</tr>
% end
</tbody>
</table>