add hidden switch to termine
This commit is contained in:
parent
8ee20a62f4
commit
3eaf98528a
@ -307,6 +307,7 @@ events:
|
|||||||
enddate: ""
|
enddate: ""
|
||||||
title: Mannschaftswettbewerb Informatik der Klassenstufen 9-12
|
title: Mannschaftswettbewerb Informatik der Klassenstufen 9-12
|
||||||
location: Jena
|
location: Jena
|
||||||
|
hidden: false
|
||||||
- date: 2024-04-04
|
- date: 2024-04-04
|
||||||
enddate: ""
|
enddate: ""
|
||||||
title: Abifiz
|
title: Abifiz
|
||||||
|
@ -1 +1 @@
|
|||||||
{{ return or (ge (.date | time.AsTime) now) (and .enddate (ge (.enddate | time.AsTime) now)) }}
|
{{ return and (not .hidden) (or (ge (.date | time.AsTime) now) (and .enddate (ge (.enddate | time.AsTime) now))) }}
|
@ -9,10 +9,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="filter-container row mx-auto">
|
<div class="filter-container row mx-auto">
|
||||||
{{ range sort .Params.events ".date" }}
|
{{ range sort .Params.events ".date" }}
|
||||||
|
{{ if not .hidden }}
|
||||||
<div class="filter-item col-12" data-groups='{{if partial "data/termin-upcoming" .}}upcoming{{else}}past{{end}}'>
|
<div class="filter-item col-12" data-groups='{{if partial "data/termin-upcoming" .}}upcoming{{else}}past{{end}}'>
|
||||||
{{ partial "termin" . }}
|
{{ partial "termin" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<div class="filter-sizer col-1"></div>
|
<div class="filter-sizer col-1"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -219,6 +219,14 @@ const IndexPagesCollection = {
|
|||||||
widget: "string",
|
widget: "string",
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "hidden",
|
||||||
|
label: "Versteckt",
|
||||||
|
hint: "Termin taucht nicht in der Liste auf",
|
||||||
|
widget: "boolean",
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user