{% extends "layouts/base.html" %} {% block title %}Teams - TryoutPro{% endblock %} {% block page_title %}Teams{% endblock %} {% block breadcrumb %}Home / Teams{% endblock %} {% block header_actions %} {% if can_manage %} {% endif %} {% endblock %} {% block content %} {% if can_manage %}

Create New Team

{% endif %} {% for team in teams %} {% set can_manage_team = can_manage or (current_user.role == 'coach' and team.coach_id == current_user.id) %}

{{ team.name }}

{% if team.coach %} Coach: {{ team.coach.username }} {% if can_manage %}
{% endif %} {% else %} No coach assigned {% endif %} {% if team.manager %} Manager: {{ team.manager.username }} {% if can_manage %}
{% endif %} {% else %} No manager assigned {% endif %}
{% if can_manage %}
{% endif %} {% if current_user.role == 'coach' and team.coach_id == current_user.id %} Notes {% endif %}
{% if can_manage_team %} {% endif %} {% for entry in team.get_players_with_status() %} {% if can_manage_team %} {% endif %} {% else %} {% endfor %}
Player Status Position / Role Email PhoneActions
{{ entry.player.username[:2] | upper }}
{{ entry.player.username }}
{% if can_manage_team %} {% else %} {{ entry.status | capitalize }} {% endif %} {{ entry.player.role | capitalize }} {{ entry.player.email }} {{ entry.player.phone or '-' }}

No players assigned

{% if can_manage_team %}

Add players to this team using the form below.

{% endif %}
{% if can_manage_team %}
Add Player to {{ team.name }}
{% endif %}
{% else %}

No teams yet

{% if can_manage %}

Create organization teams and assign coaches to manage tryouts.

{% else %}

There are no teams to display.

{% endif %}
{% endfor %} {% endblock %}