{% extends "mobile/base.html" %} {% load i18n lucide %} {% comment %} M2 -- design_handoff_rosterchief_platform/README.md's M2 section, "answer for several". See EventDetailView's own docstring (mobile/views.py) for the judgment calls: no event photos, no Kit/dressing-room fields (the Event model has none), squad response is counts-only (never who answered what). The hero's background is the club's own generic event photo (Club.event_background, set on the identity page) shown in black & white under a dark gradient -- individual events have no photo of their own, so this is the one club-wide stand-in -- falling back to a plain dark background when the club hasn't uploaded one. The per-person In/Maybe/Out forms below are hx-boost="false" -- Alpine owns the toggle between this row's two sibling forms (buttons vs. the Out reason prompt), and having htmx *also* intercept the submit broke both. A real navigation for a write action is a fine trade; hx-boost's value is in link-to-link browsing, not every POST on the page. {% endcomment %} {% block content %}
{% if club.event_background %} {% endif %}
{% lucide "chevron-left" size=20 stroke_width=2.4 class="text-white" %} {% if event.kind == "game" %}{% if event.is_home_game %}{% trans "Home game" %}{% else %}{% trans "Away game" %}{% endif %}{% else %}{{ event.get_kind_display }}{% endif %}

{{ event.title }}

{% trans "Face-off" %} {{ event.start|date:"D d M \a\t H:i" }}
{% if event.gathering %}
{% trans "Meet" %} {{ event.gathering|date:"D d M \a\t H:i" }}
{% endif %} {% if event.location %}
{% trans "Where" %} {{ event.location.name }}
{{ event.location.address }}, {{ event.location.zip_code }} {{ event.location.city }}
{% endif %}
{% if referee_signups %}
{% trans "Refereeing" %}
{% for signup in referee_signups %} {% if not forloop.first %}
{% endif %}
{{ signup.member.get_full_name }} {% if signup.status == "accepted" %}{% trans "Confirmed" %}{% endif %}
{% if signup.status != "accepted" %}
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% endfor %}
{% endif %} {% if lineup %}
{% trans "Line-up" %} {% trans "Published" %}
{% for category in lineup_categories %}
{{ category.label }}
{% for member in category.members %}{{ member.get_full_name }}{% endfor %}
{% endfor %}
{% endif %} {% if your_answers %}
{% trans "Your answers" %}
{% for answer in your_answers %} {% if not forloop.first %}
{% endif %}
{% include "mobile/_avatar.html" with person=answer.member size_class="h-8 w-8" %}
{{ answer.member.get_full_name }}
{% if answer.membership %}
{{ answer.membership.team.short_name }} {% if answer.membership.jersey_number %}· #{{ answer.membership.jersey_number }}{% endif %} {% if answer.membership.position %}· {{ answer.membership.position.name }}{% endif %}
{% endif %}
{% if answer.attendance.status == "no_response" %} {% trans "No reply" %} {% endif %}
{% if rsvp_closed or lineup %} {{ answer.attendance.get_status_display }} {% if lineup and answer.attendance.status == "selected" %} {% comment %} Only a SELECTED player sees this -- once they report a dropout, EventDetailView.post flips them to ABSENT, so a reload naturally drops this button and falls through to the shared note paragraph below instead. {% endcomment %}
{% csrf_token %}
{% endif %} {% else %} {% trans "In" as label_in %} {% trans "Maybe" as label_maybe %} {% trans "Out" as label_out %} {% with status=answer.attendance.status %}
{# grid, not flex -- see _hero_rsvp.html's own comment: flex-1/min-w-0 kept letting a longer label win a wider share; grid-cols-3's tracks are content-independent. #}
{% csrf_token %}
{% comment %} One shared reason form for both Maybe (optional) and Out (mandatory -- enforced server-side, EventDetailView.post) -- :value on the hidden status input follows whichever button was tapped. No required/minlength attrs here: mixing that with a dynamic per-status requirement got fiddly for what the backend already enforces authoritatively regardless. {% endcomment %}
{% csrf_token %}
{% if answer.attendance.note %} {# Only ever set alongside absent/maybe -- EventDetailView.post clears it for present. #}

“{{ answer.attendance.note }}”

{% endif %} {% endwith %} {% endif %}
{% endfor %}
{% endif %} {% if blocked_signups %}
{% trans "Can't sign up yet" %}
{% for row in blocked_signups %} {% if not forloop.first %}
{% endif %}
{% include "mobile/_avatar.html" with person=row.member size_class="h-8 w-8" %}
{{ row.member.get_full_name }}
{% for requirement in row.requirements %} {% blocktrans with name=requirement.name %}Complete “{{ name }}”{% endblocktrans %}{% if not forloop.last %}, {% endif %} {% endfor %}
{% endfor %}
{% endif %} {% if squad_summary %}
{% trans "Squad response" %} {% blocktrans with responded=squad_summary.responded total=squad_summary.total %}{{ responded }} of {{ total }}{% endblocktrans %}
{{ squad_summary.in_count }} {% trans "in" %} {{ squad_summary.out_count }} {% trans "out" %} {{ squad_summary.no_reply_count }} {% trans "no reply" %}
{% endif %} {% if not your_answers and not squad_summary and not lineup and not referee_signups and not blocked_signups %}

{% trans "No one you manage is invited to this event." %}

{% endif %} {% endblock content %}