{% extends "management/base.html" %} {% load i18n lucide static ui %} {% block heading %}{{ team.name }}{% endblock heading %} {% block topbar_context %} {{ team.short_name }} {% if seasons %}
{# No btn-sm: .select is height:2.25rem, matching plain .btn -- btn-sm would sit 6px shorter and misalign in the row. #}
{% endif %} {% endblock topbar_context %} {% block actions %} {% if is_club_admin %} {% lucide "pencil" size=16 %} {% trans "Edit" %} {% endif %} {% endblock actions %} {% block panel %} {% if not selected_season %}
{% lucide "calendar-x" size=20 %} {% trans "This club has no seasons yet, so there's no roster or staff to show." %}
{% else %} {% if can_manage %} {% if team_photo %} {% trans "Replace photo" as photo_modal_title %} {% else %} {% trans "Upload photo" as photo_modal_title %} {% endif %} {% url 'management:team_photo_set' team.pk selected_season.pk as team_photo_set_url %} {% include "controlpanel/_modal_form.html" with modal_id="team_photo_modal" title=photo_modal_title form=team_photo_form action_url=team_photo_set_url submit_label="Save" submit_icon="save" %} {% if team_photo %} {% trans "Remove team photo?" as remove_photo_body %} {% trans "Remove photo" as remove_photo_title %} {% url 'management:team_photo_delete' team.pk selected_season.pk as team_photo_delete_url %} {% include "controlpanel/_confirm_modal.html" with modal_id="team_photo_delete_modal" title=remove_photo_title body=remove_photo_body action_url=team_photo_delete_url submit_label="Remove" submit_icon="trash-2" %} {% endif %} {% endif %} {# --- hero: team cover photo (or an ink fallback), headline meta, photo controls and the bulk-add CTA --- #}
{% if team_photo %}
{% endif %}
{% if can_manage %} {% trans "Upload photo" as upload_photo_label %} {% trans "Replace photo" as replace_photo_label %} {% if not team_photo %} {% trans "No photo uploaded for this season yet." %} {% endif %} {% if team_photo %} {% endif %} {% endif %}
{% trans "Season" %} {{ selected_season.start_date|date:"Y" }}–{{ selected_season.end_date|date:"Y" }}
{{ team.name }}
{% blocktrans count counter=roster|length %}{{ counter }} player{% plural %}{{ counter }} players{% endblocktrans %} {% blocktrans count counter=staff|length %}{{ counter }} staff member{% plural %}{{ counter }} staff members{% endblocktrans %}
{% if can_manage %} {% lucide "users" size=16 %} {% trans "Add multiple" %} {% endif %}
{% lucide "user-check" size=13 %} {% trans "Attendance rate" %}
{% if attendance_rate is None %} {% trans "N/A" %} {% else %} {{ attendance_rate }}% {% endif %}
{% if attendance_rate is None %} {% trans "No past events this season" %} {% else %} {% endif %}
{% lucide "trending-up" size=16 %} {% trans "Top attenders" %}
{% lucide "trending-down" size=16 %} {% trans "Needs attention" %}
{% lucide "alert-triangle" size=16 %} {% trans "Missed the last 2 practices" %}
{% lucide "user-x" size=16 %} {% trans "No-shows" %}
{% trans "Roster" %} {% if can_manage %} {% endif %}
{% for membership in roster %} {% empty %} {% endfor %}
{% trans "No." %} {% trans "Player" %} {% trans "Position" %}
{{ membership.jersey_number|default:"—" }} {{ membership.member }} {% if membership.is_captain %}C{% endif %} {% if membership.is_alternate_captain %}A{% endif %} {{ membership.position|default:"—" }} {% if can_manage %}
{% endif %}
{% trans "No one on the roster for this season yet." %}
{% trans "Staff" %} {% if can_manage %} {% endif %}
{% for assignment in staff %}
{{ assignment.member.first_name|slice:":1" }}{{ assignment.member.last_name|slice:":1" }}
{{ assignment.member }}
{{ assignment.position }}
{% blocktrans with year=assignment.created|date:"Y" %}since {{ year }}{% endblocktrans %} {% if can_manage %}
{% endif %}
{% empty %}
{% trans "No staff assigned for this season yet." %}
{% endfor %}
{% lucide "flag" size=16 %} {% trans "Eligible referees" %}
{% if eligible_referees is None %}

{% trans "Referees for this team's home games are managed by the federation, not the club -- nothing to configure here." %}

{% else %}

{% trans "Members who can be assigned to referee this team's home games. Set from each member's own page." %}

{% if eligible_referees %}
{% for referee in eligible_referees %} {{ referee }} {% endfor %}
{% else %}

{% trans "No one yet." %}

{% endif %} {% endif %}
{% if can_manage %} {% trans "Add player" as add_player_label %} {% url 'management:team_roster_add' team.pk selected_season.pk as add_player_url %} {% include "controlpanel/_modal_form.html" with modal_id="add_player_modal" title=add_player_label form=roster_form action_url=add_player_url submit_label=add_player_label submit_icon="user-plus" %} {% trans "Assign staff" as add_staff_label %} {% url 'management:team_staff_add' team.pk selected_season.pk as add_staff_url %} {% include "controlpanel/_modal_form.html" with modal_id="add_staff_modal" title=add_staff_label form=staff_form action_url=add_staff_url submit_label=add_staff_label submit_icon="user-plus" %} {% trans "Edit player" as edit_player_label %} {% trans "Save" as save_label %} {% for membership in roster %} {% url 'management:team_roster_update' team.pk membership.pk as edit_player_url %} {% include "controlpanel/_modal_form.html" with modal_id=membership.pk|dom_id:"edit_player_modal" title=edit_player_label form=membership.edit_form action_url=edit_player_url submit_label=save_label submit_icon="save" %} {% blocktrans asvar remove_player_body with member=membership.member %}Remove {{ member }} from the roster?{% endblocktrans %} {% trans "Remove player" as remove_player_title %} {% trans "Remove" as remove_label %} {% url 'management:team_roster_remove' team.pk membership.pk as remove_player_url %} {% include "controlpanel/_confirm_modal.html" with modal_id=membership.pk|dom_id:"remove_player_modal" title=remove_player_title body=remove_player_body action_url=remove_player_url submit_label=remove_label submit_icon="user-minus" %} {% endfor %} {% trans "Edit staff assignment" as edit_staff_label %} {% for assignment in staff %} {% url 'management:team_staff_update' team.pk assignment.pk as edit_staff_url %} {% include "controlpanel/_modal_form.html" with modal_id=assignment.pk|dom_id:"edit_staff_modal" title=edit_staff_label form=assignment.edit_form action_url=edit_staff_url submit_label=save_label submit_icon="save" %} {% blocktrans asvar remove_staff_body with member=assignment.member %}Remove {{ member }} from staff?{% endblocktrans %} {% trans "Remove staff" as remove_staff_title %} {% url 'management:team_staff_remove' team.pk assignment.pk as remove_staff_url %} {% include "controlpanel/_confirm_modal.html" with modal_id=assignment.pk|dom_id:"remove_staff_modal" title=remove_staff_title body=remove_staff_body action_url=remove_staff_url submit_label=remove_label submit_icon="user-minus" %} {% endfor %} {% endif %} {% endif %} {% endblock panel %} {% block extra_body %} {% endblock extra_body %}