Migrate to central appointment database #45

Merged
christian merged 34 commits from sync-calendar into develop 2025-01-20 13:11:20 +00:00
2 changed files with 53 additions and 0 deletions
Showing only changes of commit b112a13c7e - Show all commits

View File

@ -0,0 +1,13 @@
---
title: Raumbelegungs Liste
date: 2025-01-20T09:02:00
draft: false
build:
list: local
# render: never
---
Auf dieser Seite werden die Angebote des Vereins noch einmal zusammen gefasst.
Dies dient der internen Kontrolle im Verein.
{{< tsc/calendar/list >}}

View File

@ -0,0 +1,40 @@
{{- $list := partialCached "tsc/calendar/list" . -}}
{{- $list = sort $list "weight" -}}
{{- $list = sort $list "start" -}}
{{- $list = sort $list "class" -}}
{{- $list = sort $list "title" -}}
<table>
<thead>
<tr>
<th>Gruppe</th>
<th>Kategorie</th>
<th>Jahrgang</th>
<th>Tag</th>
<th>Zeit</th>
<th>Ort</th>
</tr>
</thead>
<tbody>
{{ range $list -}}
<tr>
<td>
{{ .title }}{{ with .subtitle }} - {{ . }}{{ end }}
</td>
<td>
{{ with .class }}{{ . }}{{ end }}
</td>
<td>{{ with .age }}{{ . }}{{ end }}</td>
<td>{{ index site.Data.days .day }}</td>
<td>
{{- $startTimeStr := printf "2025-01-02T%s:00" .start -}}
{{- $startTime := time.AsTime $startTimeStr -}}
{{- $duration := time.Duration "minute" .duration -}}
{{- $endTime := $startTime.Add $duration}}
{{/* warnf "Start %s, duration %s, %s" $startTime $duration $endTime */}}
{{- $startTime.Format "15:04"}} - {{ $endTime.Format "15:04" }}
</td>
<td>{{ .room }}</td>
</tr>
{{- end}}
</tbody>
</table>