{% extends "management/base.html" %} {% load i18n lucide ui %} {% block heading %}{% trans "Events" %}{% endblock heading %} {% block actions %} {% if is_club_admin and rbihf_enabled %} {% lucide "download" size=16 %} {% trans "Import from RBIHF" %} {% endif %} {% if can_create %} {% lucide "repeat" size=16 %} {% trans "New series" %} {% lucide "plus" size=16 %} {% trans "New event" %} {% endif %} {% endblock actions %} {% block filter_strip %}
{% if view_mode != "calendar" %}{% endif %} {% if calendar_range != "week" %}{% endif %} {% if view_mode == "calendar" and calendar_range != "season" %}{% endif %} {% if view_mode == "list" %} {% endif %}
{% if view_mode == "calendar" %}
{% trans "Week" %} {% trans "Month" %} {% trans "Season" %}
{% if calendar_range != "season" %}
{% lucide "chevron-left" size=14 %} {% trans "Today" %} {% lucide "chevron-right" size=14 %}
{% endif %} {% endif %} {# Calendar/List segmented toggle -- member_list.html's Members/Guardians/Both pattern. #}
{% lucide "calendar" size=13 %} {% trans "Calendar" %} {% lucide "list" size=13 %} {% trans "List" %}
{% endblock filter_strip %} {% block panel %} {% if view_mode == "list" %}
{% for event in events %} {% empty %} {% endfor %}
{% trans "Title" %} {% trans "Kind" %} {% trans "When" %} {% trans "Teams" %} {% trans "Location" %}
{{ event.title }} {% if event.series_id %} {% lucide "repeat" size=12 %} {% endif %} {{ event.get_kind_display }} {{ event.start|date:"D j M Y H:i" }} {% for team in event.teams.all %}{{ team.short_name }}{% if not forloop.last %}, {% endif %}{% empty %}{% endfor %} {{ event.location.name|default:"—" }} {% if event.can_manage %}
{% lucide "pencil" size=14 %} {% trans "Edit" %}
{% endif %}
{% trans "No events." %}
{% include "management/_pagination.html" %} {% comment %} Dialogs live outside the table: may only contain elements. {% endcomment %} {% for event in events %} {% if event.can_manage %} {% endif %} {% endfor %} {% elif calendar_range == "week" %}
{% blocktrans with start=calendar.week_start|date:"j M" end=calendar.week_end|date:"j M Y" %}{{ start }} – {{ end }}{% endblocktrans %}
{% with hours_span=calendar.hours|length|add:"-1" %}
{% for day in calendar.days %}
{{ day.date|date:"D" }} {{ day.date|date:"j" }}
{% endfor %}
{% for hour in calendar.hours %} {{ hour|stringformat:"02d" }}:00 {% endfor %}
{% for day in calendar.days %} {% endfor %}
{% endwith %}
{% elif calendar_range == "month" %}
{{ anchor|date:"F Y" }}
{% for cell in calendar.weeks.0 %}
{{ cell.date|date:"D" }}
{% endfor %}
{% for week in calendar.weeks %} {% for cell in week %}
{{ cell.date|date:"j" }}
{% for event in cell.events|slice:":3" %} {{ event.title }} {% if event.series_id %}{% lucide "repeat" size=10 %}{% endif %} {% endfor %} {% if cell.events|length > 3 %} {% with extra_count=cell.events|length|add:"-3" %} {% blocktrans count counter=extra_count %}+{{ counter }} more{% plural %}+{{ counter }} more{% endblocktrans %} {% endwith %} {% endif %}
{% endfor %} {% endfor %}
{% elif calendar_range == "season" %} {% if not calendar %}
{% lucide "calendar-x" size=20 %} {% trans "Pick a season above to see its calendar." %}
{% else %}
{% for month in calendar.months %}
{{ month.label|date:"F Y" }}
{% for cell in month.weeks.0 %} {{ cell.date|date:"D"|slice:":1" }} {% endfor %}
{% for week in month.weeks %} {% for cell in week %} {% if cell.count %} {{ cell.date|date:"j" }} {{ cell.count }} {% else %} {{ cell.date|date:"j" }} {% endif %} {% endfor %} {% endfor %}
{% empty %}

{% trans "This season has no months to show." %}

{% endfor %}
{% endif %} {% endif %} {% endblock panel %}