From b8f91736283d7810047135a497e881158bf3c8f7 Mon Sep 17 00:00:00 2001 From: Artur Borecki Date: Tue, 17 Mar 2026 12:12:29 +0100 Subject: [PATCH] feat(templates/occurrence_detail.html): add `occurrence_detail` template --- kursy/templates/occurrence_detail.html | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 kursy/templates/occurrence_detail.html diff --git a/kursy/templates/occurrence_detail.html b/kursy/templates/occurrence_detail.html new file mode 100644 index 0000000..865ce00 --- /dev/null +++ b/kursy/templates/occurrence_detail.html @@ -0,0 +1,62 @@ +{% load static i18n wagtailcore_tags wagtailimages_tags %} + +

{{ event.title }}

+ +{% if event.image %} + {% image event.image original alt=event.title class="w-full max-h-64 rounded-lg mb-3 object-cover" %} +{% endif %} + +
+ + {{ occurrence.start|date }}, {{ occurrence.start|time }} – {{ occurrence.end|date }}, {{ occurrence.end|time }} +
+ +
+ + + {{ occurrence.attendees_count }}{% if event.max_attendees is not None and event.max_attendees != 0 %} / {{ event.max_attendees }}{% endif %} + +
+ +
+ {% if occurrence.is_past %} +
+

{% trans "This event has already ended. Please check our calendar for upcoming events." %}

+
+ {% elif 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 occurrence.attendees_count >= event.max_attendees and event.max_attendees is not None and event.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 }} +
+