[Getan-commits] [PATCH 3 of 3] Sort entries in wochenbericht and zeiterfassung templates by startdate

Wald Commits scm-commit at wald.intevation.org
Tue Mar 11 16:18:33 CET 2014


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1394551108 -3600
# Node ID 0ad470c4bf17d3ebde84d7cf992621e0b034b6a9
# Parent  51b2e575f39713dfa9e1af84df827f40aa89c468
Sort entries in wochenbericht and zeiterfassung templates by startdate

diff -r 51b2e575f397 -r 0ad470c4bf17 getan/templates/wochenbericht
--- 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
diff -r 51b2e575f397 -r 0ad470c4bf17 getan/templates/zeiterfassung
--- 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


More information about the Getan-commits mailing list