summaryrefslogtreecommitdiff
path: root/templates/report.t
diff options
context:
space:
mode:
Diffstat (limited to 'templates/report.t')
-rw-r--r--templates/report.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/templates/report.t b/templates/report.t
new file mode 100644
index 0000000..48c849c
--- /dev/null
+++ b/templates/report.t
@@ -0,0 +1,29 @@
+Project: {{.Name}}
+Grant: {{.Grant}}
+Start: {{.Start}}
+End: {{.End}}
+Beneficiary: {{.Beneficiary}}
+
+{{ range $id, $wp := .Workpackages }}
+## Workpackage {{ $id }}: {{ $wp.Title }}
+{{ range $tid, $task := $wp.Tasks}}
+ {{$task.ID}}: {{ $task.Title }}
+ Budget: {{ $task.Budget.AsMonth }}
+{{ end }}
+
+{{ end }}
+
+| Date | Days | WP's |
+|:-----------|---------:|:--------:|
+{{- range $d, $e := .Timeline }}
+| {{ $d }} | {{ printf "%8s" $e.Total.AsDay }} | {{ printf "%8s" $e.WPs }} |
+{{- end }}
+{{- $tl := .Timeline }}
+
+{{/* }}
+# 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 }}
+{{- end }}
+{{ */}}