Fix 'schedule' shortcode when rooms do not have events on all days
This commit is contained in:
parent
2de66d7789
commit
2463c21096
|
@ -9,10 +9,12 @@
|
||||||
{{ $rooms := dict }}
|
{{ $rooms := dict }}
|
||||||
{{ range $day := .conference.days }}
|
{{ range $day := .conference.days }}
|
||||||
{{ range $room := $data.schedule.conference.rooms }}
|
{{ range $room := $data.schedule.conference.rooms }}
|
||||||
{{ if index $rooms $room.name }}
|
{{ with index $day.rooms $room.name }}
|
||||||
{{ $rooms = merge $rooms (dict $room.name ((index $rooms $room.name) | append (index $day.rooms .name))) }}
|
{{ if index $rooms $room.name }}
|
||||||
{{ else }}
|
{{ $rooms = merge $rooms (dict $room.name ((index $rooms $room.name) | append .)) }}
|
||||||
{{ $rooms = merge $rooms (dict $room.name (index $day.rooms .name)) }}
|
{{ else }}
|
||||||
|
{{ $rooms = merge $rooms (dict $room.name .) }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue