Mercurial > getan > getan
view getan/templates/zeiterfassung2 @ 394:ac33c24807c5
templates/zeiterfassung2: Better formatting of grouping for one AP in on day.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Mon, 02 Mar 2015 11:49:48 +0100 |
parents | f155d93088a2 |
children | 4bcf0bf118ff |
line wrap: on
line source
{% for proj in projects %} {%- if proj.entries %} # project: {{ proj.key }} ({{ proj.desc }}) {% for grouper, gentries in proj.entries|sort(attribute='start')|groupby('start.day') %} {#- grouper will contain the attribute used for groupby() -#} {% for ggrouper, ggentries in gentries|groupby('workpackage') -%} {{ gentries[0].start|date_format }} {{ (ggentries|duration|human_time).rjust(5) }}h a {{ user.ljust(3) }} [{{ ggrouper }}] {%- for entry in ggentries -%} {%- if loop.index == 1 -%}{{ ' ' }} {%- else -%}{{ ';\n ' }} {%- endif -%} {{ entry.get_comment() }} {%- endfor -%} {%- endfor %} # daily sum: {{ gentries|duration|human_time }}h {% endfor -%} # total: {{ entries|duration|human_time }}h {% endif -%} {% endfor %} # total all projects: {{ total_time|human_time }}h