diff options
Diffstat (limited to '')
-rw-r--r-- | templates/expenses/show.jinja | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/templates/expenses/show.jinja b/templates/expenses/show.jinja index 59da032..ef9fb7c 100644 --- a/templates/expenses/show.jinja +++ b/templates/expenses/show.jinja @@ -5,31 +5,31 @@ {% set additionalJS = "highstock" %} {% block heading %} - {% if exps | length > 1 %} + {% if exps | length > 1 -%} Aktuelle Kosten - {% else %} + {%- else -%} Kosten für {{exps[0]|date}} {% endif %} {% endblock %} {% block content %} {% for e, p in zip(exps,pies) %} - {% if exps | length > 1 %}<h2>{{e|date}}</h2>{% endif %} + {%+ if exps | length > 1 %}<h2>{{e|date}}</h2>{% endif %} <div> <div class="month_exp"> {% for c in e.catexps | sort(attribute="cat.name") %} - {% call(exp) detail(name=c.cat.name, sum=c.sum, set=c.all) %} + {% call(exp) detail(name=c.cat.name, sum=c.sum, set=c.all) -%} <a href="{{ url_for(".edit", id = exp.id) }}">{{exp.day}}.{{exp.month}}. -- {{exp.description}}: {{exp.expense | eur }}</a> - {% endcall %} + {%- endcall %} {% endfor %} - {% call(exp) detail(name="Constant", sum=e.constsum, set=e.consts) %} + {% call(exp) detail(name="Constant", sum=e.constsum, set=e.consts) -%} <a href="{{ url_for("consts.show", id = exp.id) }}">{{exp.monthly}} -- {{exp.description}}</a> - {% endcall %} + {%- endcall %} - {% call(exp) detail(name="In Summa", sum=e.sum, set=e.all, color="#ff2d2d") %} + {% call(exp) detail(name="In Summa", sum=e.sum, set=e.all, color="#ff2d2d") -%} <a href="{{ url_for(".edit", id = exp.id) }}">{{exp.day}}.{{exp.month}}. -- {{exp.description}}: {{exp.expense | eur}}</a> - {% endcall %} + {%- endcall %} </div> <div class="pie" data-pie='{{ p | tojson }}'></div> </div> @@ -50,9 +50,9 @@ {% macro detail(name, sum, set, color=None) %} <div class="detail"> <img class="mark" src="{{ "images/closed.png" | static_url }}"> - {% call colorize(fgcolor=color) %} + {% call colorize(fgcolor=color) -%} <span class="heading">{{name}}:</span> <span class="sum">{{sum | eur}}</span><br> - {% endcall %} + {%- endcall %} <div class="details"> <ul> {% for exp in set %} |