view getan/templates/zeiterfassung @ 540:91aaf455c44e

Add new template zeiterfassung-hierarchy1 * Add template for getan-report for the use case where hierarchical project keys are used to select the workpackages within a project. The grouping within the new template is done the way it is, because a second attribute lookup is not possible in Jinja2, when having just an entry it is not possible to get the `projects[entry.project_id].key`.
author Bernhard Reiter <bernhard@intevation.de>
date Thu, 30 Jan 2020 10:47:20 +0100
parents 0ad470c4bf17
children
line wrap: on
line source
{% for proj in projects %}
{%- if proj.entries %}
# project: {{ proj.key }} ({{ proj.desc }})
{% for entry in proj.entries|sort(attribute='start') -%}
{{ entry.start|date_format}} {{ (entry.get_duration()|human_time).rjust(5) }}h ? {{ user.ljust(3) }} [{{ entry.get_workpackage() }}] {{ entry.get_comment() }}
{% endfor -%}
# total: {{ proj.get_total_duration()|human_time }}h
{% endif -%}
{% endfor %}
# total all projects: {{ total_time|human_time }}h
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)