# HG changeset patch # User Bernhard Reiter # Date 1424191709 -3600 # Node ID f155d93088a22823d0530030a971fc763943c42b # Parent 617ced8c7a40e29e6ec7734cf6ba2d109524e86f New template for zeiterfassung.py. diff -r 617ced8c7a40 -r f155d93088a2 getan/templates/zeiterfassung2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/getan/templates/zeiterfassung2 Tue Feb 17 17:48:29 2015 +0100 @@ -0,0 +1,16 @@ +{% 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 selected groupby attribute -#} + +{% 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 %}{{ 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