diff options
Diffstat (limited to 'templates/consts/show.jinja')
-rw-r--r-- | templates/consts/show.jinja | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/templates/consts/show.jinja b/templates/consts/show.jinja new file mode 100644 index 0000000..c09fc3b --- /dev/null +++ b/templates/consts/show.jinja @@ -0,0 +1,39 @@ +{% extends "layout.jinja" %} +{% from "macros.jinja" import left_arrow, right_arrow %} +{% set fmt="%m.%Y" %} + +{% block heading %} + Konstante Kosten +{% endblock %} + +{% block content %} + <ul class="arrow"> + <li><span class="heading">Beschreibung:</span> {{exp.description}}</li> + <li><span class="heading">Kategorie:</span> {{exp.category.name}}</li> + <li><span class="heading">Betrag:</span> {{exp.expense | eur}}</li> + <li><span class="heading">Betrag pro Monat:</span> {{exp.monthly | eur}}</li> + <li><span class="heading">Start:</span> {{exp.start | date(format=fmt)}}</li> + <li><span class="heading">Ende:</span> {{exp.end | date(format=fmt)}}</li> + <li><span class="heading">Zahlungsrhythmus:</span> + {% if exp.months == 1 %} + monatlich + {% elif exp.months == 6 %} + halbjährlich + {% elif exp.months == 12 %} + jährlich + {% else %} + alle {{exp.months}} Monate + {% endif %} + </ul> + <p> + <a href="{{ url_for(".edit", id = exp.id) }}">Bearbeiten</a> + <a href="{{ url_for(".add_from", other = exp.id) }}">Erstelle neuen auf dem jetzigen basierenden Eintrag</a> + </p> + {% if exp.prev %} {{ left_arrow(url_for(".show", id = exp.prev.id), target(exp.prev)) }} {% endif %} + {% if exp.next %} {{ right_arrow(url_for(".show", id = exp.next.id), target(exp.next)) }} {% endif %} +{% endblock %} + +{% macro target(p) -%} + {{ p.description }} ({{ p.start | date(fmt) ~ "-" ~ p.end | date(fmt) }})<br> + {{ p.expense | eur }} +{%- endmacro %} |