view getan/templates/zeiterfassung2 @ 553:1a179ed1c9d7

Improve getan-report templates * Move zeiterfassung-hierarchy1 to zeiterfassung-hierarchy2 to be more consistent with zeiterfassung and zeiterfassung2. * Add a new template which does not group the comments of entries as zeiterfassung-hierarchy1.
author Bernhard Reiter <bernhard@intevation.de>
date Fri, 14 Feb 2020 14:56:18 +0100
parents a499441249af
children 5ee84c9805f9
line wrap: on
line source
{% for proj in projects %}
{%- if proj.entries %}
## category: {{ proj.key }} ({{ proj.desc }})
{% for grouper, gentries in proj.entries|sort(attribute='startisoday')|groupby('startisoday') %}
{#- 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 category {{ proj.key }}: {{ proj.get_total_duration()|human_time }}h
{% endif -%}
{% endfor %}
### total all categories: {{ total_time|human_time }}h
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)