{% extends "management/base.html" %} {% load i18n lucide static ui %} {% block heading %}{% trans "Referee management" %}{% endblock heading %} {% block topbar_context %}{% trans "Every upcoming home game that needs a club-arranged referee." %}{% endblock topbar_context %} {% block filter_strip %}
{% trans "This week" %} {% trans "+ next week" %} {% trans "Next 10" %} {% trans "Next 25" %} {% trans "Next 50" %}
{% endblock filter_strip %} {% block panel %}
{% trans "Games in view" %}
{{ kpi_total }}
{% trans "In the selected range" %}
{% trans "Without a referee" %}
{{ kpi_no_referee }}
{% trans "Nobody assigned yet" %}
{% trans "Partially staffed" %}
{{ kpi_understaffed }}
{% trans "Still short a referee" %}
{% trans "Fully staffed" %}
{{ kpi_fully_staffed }}
{% trans "Nothing left to do" %}
{% trans "Fees not set" %}
{{ kpi_fees_pending }}
{% trans "Referee fee missing" %}
{% comment %} Season workload -- separate from the "games in view" KPIs above (which track the upcoming range picked by the filter strip), this is about who's actually done the refereeing this season, all-time within it, not just what's still upcoming. Deliberately one compact row, not a tall section of its own -- the games-needing-a-referee list below is the actual point of this page, so this shouldn't push it below the fold. Fees ride along as a chart tooltip (see extra_body) rather than a separate list, for the same reason. {% endcomment %}
{% trans "Active referees" %}
{{ kpi_active_referees }}
{% trans "This season" %}
{% trans "Games refereed" %}
{{ kpi_total_assignments }}
{% trans "This season" %}
{% trans "Average per referee" %}
{{ kpi_avg_games_per_referee }}
{% trans "This season" %}
{% trans "Games refereed per referee" %}
{% if referee_stats %}
{% else %}

{% trans "No referee assignments recorded yet this season." %}

{% endif %}
{% regroup games by start.date as day_groups %} {% for day in day_groups %}
{{ day.grouper|date:"l j F" }}
{% for game in day.list %}
{% for team in game.teams.all %}{{ team.short_name }}{% if not forloop.last %}, {% endif %}{% endfor %} {% if game.opponent %}{% trans "vs" %} {{ game.opponent }}{% endif %}
{{ game.start|date:"H:i" }}{% if game.location %} — {{ game.location }}{% endif %}
{% for referee in game.referee_rows %} {{ referee.display_name }}{% if referee.is_external %} ({% trans "ext." %}){% endif %} {% empty %} {% trans "No referees assigned yet." %} {% endfor %}
{{ game.referee_rows|length }} / {{ game.max_referees }} {% if game.fees_pending %}{% trans "Fee not set" %}{% endif %}
{% lucide "file-down" size=12 %} {% trans "Referee form" %}
{% endfor %}
{% empty %}

{% trans "No upcoming home games need a club-arranged referee." %}

{% endfor %} {% endblock panel %} {% block extra_body %} {% trans "Games" as games_label %} {{ charts|json_script:"referee-chart-data" }} {% endblock extra_body %}