{% extends "base.html" %} {% load static debate_tags i18n %} {% block head-title %}👑 {% trans "Breaks" %}{% endblock %} {% block page-title %}{% trans "Breaks" %}{% endblock %} {% block page-alerts %} {% if not categories.exists %} {% blocktrans trimmed asvar message %} This tournament does not have any break categories set up. You can read about how to create breaks at our documentation. {% endblocktrans %} {% include "components/alert.html" with type="warning" %} {% endif %} {% endblock %} {% block page-subnav-sections %} {% include "breakqual_subnav.html" %} {% endblock %} {% block page-subnav-actions %}
{% trans "Break Categories" %} {% trans "Team Eligibility" %}
{% endblock %} {% block content %}
{% with teams_in_tournament=tournament.team_set.count %} {% for category in categories %}

{% blocktrans trimmed with category=category.name %} {{ category }} Break {% endblocktrans %} {% blocktrans trimmed with size=category.break_size %} {{ size }} Spots {% endblocktrans %}

{% if category.nonbreaking == category.eligible %}
{% trans "Teams Eligible" %} {{ category.eligible }}/{{ teams_in_tournament }}
{% include "components/progress-bar.html" with value=category.eligible total=teams_in_tournament type="secondary" %}
{% else %} {% with total=teams_in_tournament %}
{% trans "Breaking" %} {{ category.breaking }}
{% include "components/progress-bar.html" with value=category.breaking type="success" %}
{% trans "Excluded" %} {{ category.excluded }}
{% include "components/progress-bar.html" with value=category.excluded type="warning" %}
{% trans "Eligible" %} {{ category.eligible }}
{% include "components/progress-bar.html" with value=category.eligible type="info" %}
{% endwith %} {% endif %} {% if category.eligible == 0 %} {% tournamenturl 'breakqual-edit-eligibility' as url %} {% trans "Mark teams as eligible" as text %} {% include "components/item-action.html" with alone=True type="success" to_complete=True %} {% else %} {% tournamenturl 'breakqual-teams' category.slug as url %} {% if category.breaking == 0 %} {% trans "Generate this break" as text %} {% include "components/item-action.html" with alone=True type="success" to_complete=True %} {% else %} {% trans "View this break" as text %} {% include "components/item-action.html" with type="primary" %} {% endif %} {% endif %}
{% endfor %} {% endwith %}
{% endblock content %}