{% load debate_tags participant_link i18n %}

{{ card_title }}

{% if admin_page and user.is_staff %} {% trans "Edit Database" %} {% endif %}
{% if team.registration_status == 'U' %}
{% trans "Registration not confirmed by tournament staff; will not be included in the tournament until confirmed." %}
{% endif %}
{% if not use_code_names or private_url or admin_page %} {% if team.short_name == team.long_name %}
{% trans "Team name:" %} {{ team.long_name }}
{% else %}
{% trans "Full team name:" %} {{ team.long_name }}
{% trans "Short team name:" %} {{ team.short_name }}
{% endif %} {% endif %} {% if pref.team_code_names != 'off' %}
{% trans "Code name:" %} {% if team.code_name %} {{ team.code_name }} {% else %} {% trans "No code name assigned" %} {% endif %}
{% endif %} {% if pref.show_emoji %}
{% trans "Emoji:" %} {% if team.emoji %} {{ team.emoji }} {% else %} {% trans "No emoji assigned" %} {% endif %}
{% endif %}
{% if pref.show_speakers_in_draw %}
{% trans "Speakers:" %} {% for speaker in team.speakers %} {% person_display_name speaker %}{% if not forloop.last %}{% trans ", " %}{% endif %} {% empty %} {% trans "None" %} {% endfor %}
{% endif %} {% if pref.public_break_categories or admin_page or private_url %}
{% trans "Eligible for break categories:" %} {% for category in team.break_categories.all %} {{ category.name }}{% if not forloop.last %}{% trans ", " %}{% endif %} {% empty %} {% trans "None" %} {% endfor %}
{% if participant %}
{% trans "Speaker categories:" %} {% for category in participant.categories.all %} {{ category.name }}{% if not forloop.last %}{% trans ", " %}{% endif %} {% empty %} {% trans "None" %} {% endfor %}
{% endif %}
{% endif %} {% if pref.show_team_institutions or admin_page or private_url %}
{% trans "Institution:" %} {% if team.institution %} {{ team.institution.name }} {% else %} {% trans "Unaffiliated" %} {% endif %}
{% if team.institution.region %}
{% trans "Region:" %} {{ team.institution.region.name }}
{% endif %}
{% endif %} {% haspermission "view.answers" as answers_perm %} {% haspermission "add.team" as add_team_perm %} {% haspermission "delete.speaker" as delete_speaker_perm %} {% if admin_page and answers_perm %}
{% trans "Custom Questions:" %}
{% team_name team admin_page %}
    {% for answer in team.answers.all %}
  • {{ answer.question.name }}: {{ answer.answer }}
  • {% endfor %}
{% for speaker in team.speakers %}
{{ speaker.name }}
    {% for answer in speaker.answers.all %}
  • {{ answer.question.name }}: {{ answer.answer }}
  • {% endfor %}
{% endfor %}
{% endif %} {% if admin_page and add_team_perm %}
{% trans "Speakers:" %}
{% for speaker in team.speakers %}
{{ speaker.name }} {% if delete_speaker_perm %} {% trans "Delete" %} {% endif %}
{% endfor %}
{% endif %} {% if admin_page and answers_perm %}
{% trans "Institutional Conflicts:" %} {% for ic in team.teaminstitutionconflict_set.all %} {{ ic.institution.name }}{% if not forloop.last %}{% trans "; " %}{% endif %} {% empty %} {% trans "None" %} {% endfor %}
{% trans "Adjudicator Conflicts:" %} {% for ac in team.adjudicatorteamconflict_set.all %} {% person_display_name ac.adjudicator %}{% if not forloop.last %}{% trans ", " %}{% endif %} {% empty %} {% trans "None" %} {% endfor %}
{% trans "Room Constraints:" %} {% for vc in team.venue_constraints.all %} {{ vc.category }}{% if not forloop.last %}{% trans ", " %}{% endif %} {% empty %} {% trans "None" %} {% endfor %}
{% endif %}