diff --git a/content/termine/_index.md b/content/termine/_index.md index 8b16ccd1..7d4c4bf9 100644 --- a/content/termine/_index.md +++ b/content/termine/_index.md @@ -307,6 +307,7 @@ events: enddate: "" title: Mannschaftswettbewerb Informatik der Klassenstufen 9-12 location: Jena + hidden: false - date: 2024-04-04 enddate: "" title: Abifiz diff --git a/layouts/partials/data/termin-upcoming.html b/layouts/partials/data/termin-upcoming.html index 3d093194..1c1cd37b 100644 --- a/layouts/partials/data/termin-upcoming.html +++ b/layouts/partials/data/termin-upcoming.html @@ -1 +1 @@ -{{ return or (ge (.date | time.AsTime) now) (and .enddate (ge (.enddate | time.AsTime) now)) }} \ No newline at end of file +{{ return and (not .hidden) (or (ge (.date | time.AsTime) now) (and .enddate (ge (.enddate | time.AsTime) now))) }} \ No newline at end of file diff --git a/layouts/termine/list.html b/layouts/termine/list.html index 493bcbe7..d007fd5f 100644 --- a/layouts/termine/list.html +++ b/layouts/termine/list.html @@ -9,10 +9,12 @@
{{ range sort .Params.events ".date" }} + {{ if not .hidden }}
{{ partial "termin" . }}
{{ end }} + {{ end }}
diff --git a/static/admin/config/collections/index-pages.js b/static/admin/config/collections/index-pages.js index d472f097..fcae597f 100644 --- a/static/admin/config/collections/index-pages.js +++ b/static/admin/config/collections/index-pages.js @@ -219,6 +219,14 @@ const IndexPagesCollection = { widget: "string", required: false, }, + { + name: "hidden", + label: "Versteckt", + hint: "Termin taucht nicht in der Liste auf", + widget: "boolean", + required: false, + default: false, + }, ], }, ],