Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% 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 %}
{% unless include.event.registration_period.from == nil and
include.event.registration_period.to == nil and
include.event.fully_booked_out == nil and
include.event.registration_link == nil and
include.event.waiting_list_link == nil %}
<h2>Registration</h2>
{% comment %}
Cases:
1) Registration period is over.
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.
{% endcomment %}
{% assign today = "now" | date: "%Y-%m-%d" %}
{% if include.event.registration_period.to < today %}
The Registration period is over.
{% else %}
{% 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 %}
The event is completely booked out and there is no waiting list.
{% else %}
{% include events/event_waiting_list_badge.html %}
The event is booked out. The waiting list is open until
<strong class="text-danger">
{{ include.event.registration_period.to | date_to_long_string }}​
</strong>.
{% endunless %}
{% else %}
{% if include.event.registration_period.from <= today and
include.event.registration_period.to >= today and
include.event.registration_link %}
{% include events/event_registration_open_badge.html %}
Registrations are open until
<strong class="text-danger">
{{ include.event.registration_period.to | date_to_long_string }}
</strong>
or until the event is booked out.
{% else %}
Registrations are not open yet.
They will be open from
<strong>
{{ include.event.registration_period.from | date_to_long_string }}
</strong>
to
<strong>
{{ include.event.registration_period.to | date_to_long_string }}
</strong>
or until the event is booked out.
{% endif %}
{% endif %}
{% endif %}
{% endunless %}