Skip to content
Snippets Groups Projects
Commit b86e8347 authored by Lukas Ruge's avatar Lukas Ruge
Browse files

fix bug for events in the future

parent e1cc60ce
No related branches found
No related tags found
No related merge requests found
Pipeline #12913 passed
......@@ -18,8 +18,6 @@ Documentation: https://wiki.chaotikum.org/howto:chaotikumwebsite:media (Please u
Finding the first and last talk to establish the variables "earliest" and "latest". Then converting this into a duration in days.
{% endcomment -%}
{% capture earliest %}{{'now' | date: '%s'}}{% endcapture -%}
{% capture latest %}0{% endcapture -%}
{% assign conference_media = site.media | where_exp: "video", "video.conferences contains conference.acronym" -%}
......@@ -43,13 +41,19 @@ Finding the first and last talk to establish the variables "earliest" and "lates
{% if conference.date and recording_date.event != ''%}
{% assign recording_date = conference.date -%}
{% else -%}
{% assign recording_date = earliest -%}
{% assign recording_date = now -%}
{% endif -%}
{% endif -%}
{% capture recordingdate %}{{recording_date | date: '%s'}}{% endcapture -%}
{% if recordingdate < earliest -%}
{% if earliest and earliest != '' -%}
{% if recordingdate < earliest -%}
{% assign earliest = recordingdate -%}
{% endif -%}
{% else -%}
{% assign earliest = recordingdate -%}
{% endif -%}
{% if recordingdate > latest -%}
{% assign latest = recordingdate -%}
{% endif -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment