summaryrefslogtreecommitdiff
path: root/kosten/templates/consts/list.jinja
blob: 7fef3449b797e0f4c31a1799198b62e4964f233d (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
{% 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") }}

    {% 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) %}
    <h2>{{ h }}</h2>
    <ul class="arrow">
        {% for c in list -%}
            <li><a href="{{ url_for(".show", id = c.id) }}">{{c.description}} ({{c.expense | eur}})</a></li>
        {% endfor %}
    </ul>
{% endmacro %}