From 5866162932bc16a899230486a06d1647c1e7f4c4 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Mon, 2 Jun 2025 15:52:21 +0200 Subject: [PATCH] [A11y] change organizer page-titles based calendar-view (#5197) * [A11y] change organizer page-titles based calendar-view * add current date to title as in h2 --- .../templates/pretixpresale/organizers/calendar.html | 6 +++++- .../templates/pretixpresale/organizers/calendar_day.html | 6 +++++- .../templates/pretixpresale/organizers/calendar_week.html | 8 ++++++-- src/pretix/presale/views/organizer.py | 1 + 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/pretix/presale/templates/pretixpresale/organizers/calendar.html b/src/pretix/presale/templates/pretixpresale/organizers/calendar.html index 2cb977dbe..a2b0e4b04 100644 --- a/src/pretix/presale/templates/pretixpresale/organizers/calendar.html +++ b/src/pretix/presale/templates/pretixpresale/organizers/calendar.html @@ -4,7 +4,11 @@ {% load rich_text %} {% load eventurl %} {% load urlreplace %} -{% block title %}{% trans "Event overview" %}{% endblock %} +{% block title %} + {% blocktrans trimmed with month=date|date:"F Y" %} + Events in {{ month }} + {% endblocktrans %} +{% endblock %} {% block content %} {% if organizer_homepage_text %}
diff --git a/src/pretix/presale/templates/pretixpresale/organizers/calendar_day.html b/src/pretix/presale/templates/pretixpresale/organizers/calendar_day.html index b616cf833..820f07e3f 100644 --- a/src/pretix/presale/templates/pretixpresale/organizers/calendar_day.html +++ b/src/pretix/presale/templates/pretixpresale/organizers/calendar_day.html @@ -4,7 +4,11 @@ {% load rich_text %} {% load eventurl %} {% load urlreplace %} -{% block title %}{% trans "Event overview" %}{% endblock %} +{% block title %} + {% blocktrans trimmed with day=date|date:"DATE_FORMAT" %} + Events on {{ day }} + {% endblocktrans %} +{% endblock %} {% block content %} {% if organizer_homepage_text %}
diff --git a/src/pretix/presale/templates/pretixpresale/organizers/calendar_week.html b/src/pretix/presale/templates/pretixpresale/organizers/calendar_week.html index 49bc9fe7c..b4077d6d0 100644 --- a/src/pretix/presale/templates/pretixpresale/organizers/calendar_week.html +++ b/src/pretix/presale/templates/pretixpresale/organizers/calendar_week.html @@ -4,7 +4,11 @@ {% load rich_text %} {% load eventurl %} {% load urlreplace %} -{% block title %}{% trans "Event overview" %}{% endblock %} +{% block title %} + {% blocktrans trimmed with week=date|date:week_format week_day_from=date|date:short_month_day_format week_day_to=date_to|date:short_month_day_format %} + Events in {{ week }} ({{ week_day_from }} – {{ week_day_to }}) + {% endblocktrans %} +{% endblock %} {% block content %} {% if organizer_homepage_text %}
@@ -18,7 +22,7 @@

- {% blocktrans trimmed with week=date|date:week_format week_day_from=date|date:short_month_day_format week_day_to=date|date:short_month_day_format %} + {% blocktrans trimmed with week=date|date:week_format week_day_from=date|date:short_month_day_format week_day_to=date_to|date:short_month_day_format %} Events in {{ week }} ({{ week_day_from }} – {{ week_day_to }}) {% endblocktrans %} diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py index 480480fda..6d7c3e420 100644 --- a/src/pretix/presale/views/organizer.py +++ b/src/pretix/presale/views/organizer.py @@ -811,6 +811,7 @@ class WeekCalendarView(OrganizerViewMixin, EventListMixin, TemplateView): ) + timedelta(days=1) ctx['date'] = week.monday() + ctx['date_to'] = week.sunday() ctx['before'] = before ctx['after'] = after