diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-11-26 16:14:15 +0100 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-11-26 16:14:15 +0100 |
commit | d564211dbbef53f8e41067bfafff9948c83b975c (patch) | |
tree | 690baddca36fc4ad6e12dae8f4906828cd8ea793 | |
parent | fe0ca581f1c13116b9378befb5b62c4d2f7d2947 (diff) |
templates added
-rw-r--r-- | templates/plan-template.t | 6 | ||||
-rw-r--r-- | templates/report.t | 29 |
2 files changed, 35 insertions, 0 deletions
diff --git a/templates/plan-template.t b/templates/plan-template.t new file mode 100644 index 0000000..d711f01 --- /dev/null +++ b/templates/plan-template.t @@ -0,0 +1,6 @@ +# Days +{{- $tl := .Timeline }} +{{ range .Days }} +{{ if .IsWeekend }}# {{end}}{{.Date}}{{ if .IsWeekend }} weekend{{ end -}} +{{ with $e := index $tl .Date }} {{ printf "%8s" $e.Total.AsDay }} {{ printf "%8s" $e.WPs }} {{ end }} +{{- end }} 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 }} +{{ */}} |