[Getan-commits] [PATCH] templates/zeiterfassung2: improved: "category" instead of "project". Fixed missing newline before new workpackage
Wald Commits
scm-commit at wald.intevation.org
Mon Mar 2 12:17:39 CET 2015
# HG changeset patch
# User Bernhard Reiter <bernhard at intevation.de>
# Date 1425295048 -3600
# Node ID 4bcf0bf118ff110d10f4e4e5e26306f4c5db8b4d
# Parent ac33c24807c5053a1c8dc238145ad3fb166475ee
templates/zeiterfassung2: improved: "category" instead of "project". Fixed missing newline before new workpackage.
diff -r ac33c24807c5 -r 4bcf0bf118ff getan/templates/zeiterfassung2
--- a/getan/templates/zeiterfassung2 Mon Mar 02 11:49:48 2015 +0100
+++ b/getan/templates/zeiterfassung2 Mon Mar 02 12:17:28 2015 +0100
@@ -1,10 +1,10 @@
{% for proj in projects %}
{%- if proj.entries %}
-# project: {{ proj.key }} ({{ proj.desc }})
+## category: {{ proj.key }} ({{ proj.desc }})
{% for grouper, gentries in proj.entries|sort(attribute='start')|groupby('start.day') %}
{#- grouper will contain the attribute used for groupby() -#}
-{% for ggrouper, ggentries in gentries|groupby('workpackage') -%}
+{% 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 -%}
{%- if loop.index == 1 -%}{{ ' ' }}
@@ -14,9 +14,8 @@
{%- endfor -%}
{%- endfor %}
# daily sum: {{ gentries|duration|human_time }}h
-
{% endfor -%}
-# total: {{ entries|duration|human_time }}h
+## total category {{ proj.key }}: {{ entries|duration|human_time }}h
{% endif -%}
{% endfor %}
-# total all projects: {{ total_time|human_time }}h
+### total all categories: {{ total_time|human_time }}h
More information about the Getan-commits
mailing list