# HG changeset patch # User Bernhard Reiter # Date 1425293388 -3600 # Node ID ac33c24807c5053a1c8dc238145ad3fb166475ee # Parent f155d93088a22823d0530030a971fc763943c42b templates/zeiterfassung2: Better formatting of grouping for one AP in on day. diff -r f155d93088a2 -r ac33c24807c5 getan/templates/zeiterfassung2 --- a/getan/templates/zeiterfassung2 Tue Feb 17 17:48:29 2015 +0100 +++ b/getan/templates/zeiterfassung2 Mon Mar 02 11:49:48 2015 +0100 @@ -2,11 +2,17 @@ {%- 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 -#} +{#- 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 %}{{ entry.get_comment() -}}; {% endfor %} -{% endfor -%} +{{ 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 -%}