diff --git a/home/templates/home/event_page.html b/home/templates/home/event_page.html new file mode 100644 index 0000000..26d4b85 --- /dev/null +++ b/home/templates/home/event_page.html @@ -0,0 +1,58 @@ +{% load static i18n wagtailcore_tags wagtailimages_tags %} + +

{{ page.title }}

+ +{% if page.image %} + {% image page.image original alt=page.title class="w-full h-auto rounded-lg mb-3" %} +{% endif %} + +
+ + {{ page.start|date }}, {{ page.start|time }} – {{ page.end|date }}, {{ page.end|time }} +
+ +
+ + + {{ page.attendees_count }}{% if page.max_attendees is not None and page.max_attendees != 0 %} / {{ page.max_attendees }}{% endif %} + +
+ + +
+ {% if user_signed_up %} +
+

{% trans "You are signed up for this event. We look forward to seeing you there!" %}

+ + + {% trans "Cancel Sign Up" %} + +
+ {% elif not user.is_authenticated %} + {# If the user is not authenticated, we can prompt them to log in or sign up. #} +
+

{% trans "You need to be logged in to sign up for this event. Please log in or sign up to reserve your spot." %}

+ + {% trans "Login" %} + + + {% trans "Sign Up" %} + +
+ {% elif page.attendees_count >= page.max_attendees and page.max_attendees is not None and page.max_attendees != 0 %} +
+

{% trans "This event is fully booked. Please check back later for any cancellations." %}

+
+ {% else %} +
+

{% trans "You are not signed up for this event. Please sign up to reserve your spot." %}

+ + {% trans "Sign Up for Event" %} + +
+ {% endif %} +
+ +
+ {{ page.description | richtext }} +