summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/report.t14
1 files changed, 6 insertions, 8 deletions
diff --git a/templates/report.t b/templates/report.t
index 48c849c..ce1e74c 100644
--- a/templates/report.t
+++ b/templates/report.t
@@ -6,24 +6,22 @@ Beneficiary: {{.Beneficiary}}
{{ range $id, $wp := .Workpackages }}
## Workpackage {{ $id }}: {{ $wp.Title }}
-{{ range $tid, $task := $wp.Tasks}}
+{{ range $tid, $task := $wp.Tasks }}
{{$task.ID}}: {{ $task.Title }}
Budget: {{ $task.Budget.AsMonth }}
{{ end }}
{{ end }}
-| Date | Days | WP's |
+| Date | Time | WP's |
|:-----------|---------:|:--------:|
{{- range $d, $e := .Timeline }}
-| {{ $d }} | {{ printf "%8s" $e.Total.AsDay }} | {{ printf "%8s" $e.WPs }} |
+| {{ $d }} | {{ printf "%8s" $e.Total }} | {{ printf "%8s" $e.WPs }} |
{{- end }}
-{{- $tl := .Timeline }}
+{{- $tl := .Timeline }}{{- $hd := .Holidays }}
-{{/* }}
# Days
{{ range .Days }}
-{{if .IsWeekend }}({{else}} {{end}}{{.Date}}{{ if .IsWeekend }}){{else}} {{end -}}
-{{ with $e := index $tl .Date }} {{ printf "%8s" $e.Total.AsDay }} {{ printf "%8s" $e.WPs }} {{ end }}
+{{if or .IsWeekend .IsHoliday }}# {{end}}{{.Date}}{{ if .IsHoliday}} ({{ index $hd .Date}}){{end -}}
+{{ with .Planned }} Planned: {{ .Total }}{{ end }}{{ with .Worked }} Worked: {{ .Total }}{{end}}
{{- end }}
-{{ */}}