{% extends "layouts/base.html" %} {% block title %}{% if match %}Edit Match{% else %}Schedule Match{% endif %} - {{ tryout.title }} - UdeS team manager{% endblock %} {% block page_title %}{% if match %}Edit Match{% else %}Schedule Match{% endif %}{% endblock %} {% block breadcrumb %} Home / Tryouts / {{ tryout.title }} {% if match %} / Edit Match {% else %} / Schedule Match {% endif %} {% endblock %} {% block content %}

{% if match %}Edit Match{% elif is_practice %}Schedule Practice — {{ team.name }}{% else %}Schedule Match for {{ tryout.title }}{% endif %}

{% if match %}

Match Type: {{ match.match_type.replace('_', ' ') | title }}

{% endif %}
{% if is_practice %} {% endif %} {% if not is_practice %} {% if not match %}
{% else %} {% endif %} {% endif %} {% if not is_practice %}
{% endif %}
{% if match %}
{% endif %}
{% if current_user.can_manage_teams() or current_user.can_schedule_matches() %}

{{ _('Select Match Time') }}

{{ _('Click time slots consecutively to set match duration. Players available in all selected time blocks are shown below.') }}

{{ _('Loading...') }}

{% else %}
{% endif %}

{{ _('Select Teams') }}

{% if match and match.team1 %}
{{ match.team1.name }}
    {% for member in match.team1.members %}
  • {{ member.player.username if member.player else 'Unknown Player' }}{% if member.position %} {{ member.position }}{% endif %} {% set pdata = participants_map.get(member.player_id) %} {% if pdata %} {{ '✅ Confirmed' if pdata.attendance_confirmed else '⏳ Pending' }} {% endif %}
  • {% else %}
  • {{ _('No players assigned') }}
  • {% endfor %}
{% endif %} {% if match and match.team2 %}
{{ match.team2.name }}
    {% for member in match.team2.members %}
  • {{ member.player.username if member.player else 'Unknown Player' }}{% if member.position %} {{ member.position }}{% endif %} {% set pdata = participants_map.get(member.player_id) %} {% if pdata %} {{ '✅ Confirmed' if pdata.attendance_confirmed else '⏳ Pending' }} {% endif %}
  • {% else %}
  • {{ _('No players assigned') }}
  • {% endfor %}
{% endif %}

{{ _('Select Players') }}

vs 0

{{ _('Select players then click Randomize to split them into teams.') }}

{{ _('Team 1') }}
Available Players

{{ _('All registered players are shown. Click time slots to filter available players.') }}

{{ _('Team 2') }}

{{ _('Select Players') }}

{% if current_user.can_manage_teams() or current_user.can_schedule_matches() %}

{{ _('Green indicators show player availability for the match date/time') }}

{% endif %}
{% for player in all_players %} {% endfor %}
{{ _('Cancel') }}
{% endblock %} {% block scripts %} {% endblock %}