{% extends "base.html" %} {% block content %}

{% trans %}Teams{% endtrans %}

{% if q and field %}
Searching for teams with {{ field }} matching {{ q }}
Page {{ teams.page }} of {{ teams.total }} results
{% endif %} {% with form = Forms.teams.PublicTeamSearchForm(field=field, q=q) %}
{{ form.field(class="form-select w-100") }}
{{ form.q(class="form-control w-100", placeholder="Search for matching teams") }}
{% endwith %}

{% for team in teams.items %} {% endfor %}
{% trans %}Team{% endtrans %} {% trans %}Website{% endtrans %} {% trans %}Affiliation{% endtrans %} {% trans %}Country{% endtrans %}
{% if scores_visible() %} {{ team.name | truncate(50) }} {% else %} {{ team.name | truncate(50) }} {% endif %} {% if team.bracket_id %} {{ team.bracket.name }} {% endif %} {% if team.oauth_id %} Official {% endif %} {% if team.website and (team.website.startswith('http://') or team.website.startswith('https://')) %} {% endif %} {% if team.affiliation %} {% if team.affiliation | length > 50 %} {% if team.affiliation %}{{ team.affiliation | truncate(50) }}{% endif %} {% else %} {% if team.affiliation %} {{ team.affiliation | truncate(50) }} {% endif %} {% endif %} {% endif %} {% if team.country %} {{ lookup_country_code(team.country) }} {% endif %}
{% if teams.pages > 1 %}
{% trans %}Page{% endtrans %}
{% if teams.page != 1 %} <<< {% endif %} {% if teams.next_num %} >>> {% endif %}
{% endif %}
{% endblock %} {% block scripts %} {{ Assets.js("assets/js/teams/list.js") }} {% endblock %}