schmeckels/templates/transactions.html
Felix Breidenstein 1dc9d35475 fixed serve
2020-10-18 22:45:32 +02:00

43 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block main %}
<form action="/bulksort" method="POST">
<select name="tag">
{% for tag in tags %}
<option value="{{ tag.id }}">{{ tag.name }}</option>
{% endfor %}
</select>
<input type="submit">
<table class="table-auto">
<thead>
<tr>
<th class="px-4 py-2"></th>
<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 text-right">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"><input type="checkbox" name="transaction" value="{{ t.id }}"></td>
<td class="border px-4 py-2">{{ t.get_date("de") }}</td>
<td class="border px-4 py-2">{{ t.name }}<br/> <span class="text-gray-500">{{t.iban}}</span></td>
<td class="border px-4 py-2">{{ t.description }}</td>
<td class="border px-4 py-2 text-right {{ 'text-green-500' if t.is_positive() else 'text-red-500' }}">{{ t.pretty_amount() }} €</td>
<td class="border px-4 py-2">
{% for tag in t.tags %}
<span style="background-color: {{ tag.color() }};" class="text-white rounded p-1" >{{ tag.name }}</span>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}