blob: 80d22adb48815dad103c138b5186e23904634e8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{% extends "layout.jinja" %}
{% block heading %}
Konstante Kosten
{% endblock %}
{% block content %}
<p><a href="{{ url_for(".add") }}">Neuen Eintrag hinzufügen</a></p>
{{ list(current, "Aktuell", True) }}
{% if last_month %} {{ list(last_month, "Endeten letzten Monat") }} {% endif %}
{% if future %} {{ list(future, "Zukünftige") }} {% endif %}
{% if old %} {{ list(old, "Veraltet") }} {% endif %}
{% endblock %}
{% macro list(list, h, use_current = False) %}
<h2>{{ h }}</h2>
<ul class="arrow">
{% for group in list -%}
{% for e in (group.current_expenses() if use_current else group.expenses) -%}
<li><a href="{{ url_for(".show", id = e.id) }}">{{group.description}} {% if e.description %}({{e.description}}) {% endif %} ({{e.expense | eur}})</a></li>
{% endfor %}
{% endfor %}
</ul>
{% endmacro %}
|