Mercurial > getan > getan
annotate getan/templates/zeiterfassung-hierarchy2 @ 568:e7b36e596751 tip
Last week's year is not necessarily today's year
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 03 Jan 2022 11:37:31 +0100 |
parents | 1a179ed1c9d7 |
children |
rev | line source |
---|---|
553
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
1 {#- using project keys as zeiterfassung's workpackages |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
2 -#} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
3 {%- for day, day_entries |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
4 in entries|sort(attribute='startisoday')|groupby('startisoday') -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
5 {%- for project in projects -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
6 {%- for project_id, project_day_entries |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
7 in day_entries|sort(attribute='project_id')|groupby('project_id') %} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
8 |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
9 {%- if project_id == project.id -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
10 {{ project_day_entries[0].start|date_format }} {{ (project_day_entries|duration|human_time).rjust(5) |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
11 }}h a {{ user.ljust(3) }} [{{ project.key }}] |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
12 {%- for entry in project_day_entries -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
13 {%- if loop.index == 1 -%}{{ ' ' }} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
14 {%- else -%}{{ ';\n ' }} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
15 {%- endif -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
16 {{ entry.get_comment() }} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
17 {%- endfor %}{{'\n'}} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
18 {%- endif -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
19 {%- endfor -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
20 {%- endfor -%} |
1a179ed1c9d7
Improve getan-report templates
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
21 {% endfor -%} |