Mercurial > getan
changeset 377:0ad470c4bf17
Sort entries in wochenbericht and zeiterfassung templates by startdate
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 11 Mar 2014 16:18:28 +0100 |
parents | 51b2e575f397 |
children | bdc4e45f9f4f |
files | getan/templates/wochenbericht getan/templates/zeiterfassung |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/templates/wochenbericht Mon Mar 10 10:13:54 2014 +0100 +++ b/getan/templates/wochenbericht Tue Mar 11 16:18:28 2014 +0100 @@ -6,7 +6,7 @@ {% for proj in projects %} # {{ proj.desc }} -{% for entry in proj.entries -%} +{% for entry in proj.entries|sort(attribute='start') -%} {{ entry.get_comment() }} {% endfor -%} # total time: {{ proj.get_total_duration()|human_time }}h
--- a/getan/templates/zeiterfassung Mon Mar 10 10:13:54 2014 +0100 +++ b/getan/templates/zeiterfassung Tue Mar 11 16:18:28 2014 +0100 @@ -1,7 +1,7 @@ {% for proj in projects %} {%- if proj.entries %} # project: {{ proj.key }} ({{ proj.desc }}) -{% for entry in proj.entries -%} +{% 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