{% comment %} If registration variables are set in event front matter, badges and texts are displayed on event details page and event overview page showing the registration status of the event. {% endcomment %} {% comment %} In case no registration data is given, do not display any registration information. There might still be registration information in the free text of the event. {% endcomment %} {% if include.event.registration_period.from and include.event.registration_period.to or include.event.fully_booked_out or include.event.registration_link or include.event.waiting_list_link %} {% comment %} Cases: 1) Registration period is over (do not display any registration information). 2) Event is booked out, there is no waiting list. 3) Event is booked out, there is a waiting list. 4) Registrations are open. 5) Registrations are not open yet (do not display any registration information). {% endcomment %} {% assign today = "now" | date: "%Y-%m-%d" %} {% if include.event.start.date >= today %} {% if include.event.fully_booked_out == true or include.event.waiting_list_link %} {% unless include.event.waiting_list_link %} {% include events/event_fully_booked_out_badge.html %} {% else %} {% include events/event_waiting_list_badge.html %} {% endunless %} {% else %} {% if include.event.registration_period.from <= today and include.event.registration_period.to >= today %} {% include events/event_registration_open_badge.html %} {% endif %} {% endif %} {% endif %} {% endif %}