{% load i18n lucide ui %} {% comment %} Shared by the event detail page and the referee management dashboard -- context: event, referees (EventReferee rows -- fee/km/km_rate read straight off the model instance, no separate form object needed), referee_candidates, referees_full, can_manage_referees, and an optional next_url to return to after a POST (defaults to the event detail page when blank). The fee is entered right here, inline, rather than behind a "Fee" button that opened a second (and on the dashboard, nested-inside-a-dialog) modal -- that extra click-through was the easiest way for a fee to slip past everyone's attention until PDF export time. Travel (km/rate) stays behind a small disclosure since most assignments never need it, but posts in the same form as the fee so there's still only one Save per referee. {% endcomment %}

{% lucide "flag" size=18 %} {% trans "Referees" %} {{ referees|length }} / {{ event.max_referees }}

{% if can_manage_referees %} {% lucide "file-down" size=12 %} {% trans "Referee form (PDF)" %} {% endif %}
{% if can_manage_referees and not referees_full %}
{% trans "Add a referee" %} {% if referee_candidates %}
{% csrf_token %} {% if next_url %}{% endif %} {# No btn-sm: .select is height:2.25rem, matching plain .btn -- btn-sm would sit 6px shorter and misalign in the row. #}
{% else %}

{% trans "No eligible referees for this team yet." %} {% trans "Link a referee level to this team." %}

{% endif %}
{% csrf_token %} {% if next_url %}{% endif %} {# No btn-sm: .input is height:2.25rem, matching plain .btn -- btn-sm would sit 6px shorter and misalign in the row. #}

{% trans "⚠ = also expected at another event around this time -- shown as a warning, not blocked." %}

{% elif can_manage_referees and referees_full %}

{% trans "This game already has its maximum number of referees." %}

{% endif %}