{% extends "tournamentcontrol/competition/admin/workbook/base.html" %} {% load i18n common admin_workbook %} {% block page_title %}{% trans "Allocate" %}{% if date %} · {{ date|date:"j M Y" }}{% endif %}{% endblock %} {% block content %}

{% icon "clock" %}{% trans "Allocate times and grounds" %}

{% if date %}{{ date|date:"l j F Y" }}{% else %}{% trans "Schedule" %}{% endif %}

{% if division %}{{ division.title }}{% if stage %} · {{ stage.title }}{% endif %} · {% endif %}{% trans "Give each match a kick-off time and a ground. A ground cannot host two matches at once." %}

{% if date %}
{% icon "layout-grid" %}{% trans "Visual schedule" %} {% trans "(opens a new tab)" %}
{% endif %}
{% csrf_token %} {{ formset.management_form }}

{% trans "Matches" %}

{% trans "Cancel" %}
{% include "touchtechnology/admin/workbook/_problems.html" with form=None %} {% regroup formset.forms by instance.stage.division as grouped %} {% for group in grouped %}

{{ group.grouper }}

{% for form in group.list %} {% with match=form.instance %}
{{ form.id }}
{% if match.label %}{{ match.label }}{% else %}{% blocktrans with num=match.round %}Round {{ num }}{% endblocktrans %}{% endif %}
{{ match }}
{% field form.time %} {% field form.play_at %}
{% endwith %} {% endfor %}
{% empty %}

{% trans "There are no matches to allocate on this day." %}

{% endfor %}
{% endblock %}