{% extends "touchtechnology/admin/explorer/form_page.html" %} {% load i18n common admin admin_explorer %} {% block page_title %}{% trans "Allocate" %}{% endblock %} {% block page_kind %}{{ date|date:"l j F Y" }}{% if division %} – {{ division.title }}{% if stage %}, {{ stage.title }}{% endif %}{% endif %}{% endblock %} {% block page_icon %}{% icon "allocate" %}{% endblock %} {% block cancel-url %}{{ season.urls.edit }}#schedule-tab{% endblock %} {% block page_nav %}{% include "tournamentcontrol/competition/admin/explorer/_day_nav.html" with day_url="admin:fixja:match-schedule" day_page="schedule" %}{% endblock %} {% block form-body %} {{ formset.management_form }} {% if formset.non_form_errors %} {% endif %}

{% trans "Give each match a kick-off time and a ground. A clash of ground and time is refused when you save." %}

{% regroup formset.forms by instance.stage.division as grouped %} {% for group in grouped %}

{% icon "division" %}{{ group.grouper }} {{ group.list|length }}

{% for form in group.list %} {% with match=form.instance %} {% if form.non_field_errors %}{% endif %} {% endwith %} {% endfor %}
{% trans "Round" %} {% trans "Match" %} {% trans "Time" %} {% trans "Ground" %}
{{ form.id }}{% if match.label %}{{ match.label }}{% else %}{% blocktrans with n=match.round %}Round {{ n }}{% endblocktrans %}{% endif %}{% if match.stage_group %} {{ match.stage_group.title }}{% endif %} {{ match.get_home_team_plain }} v {{ match.get_away_team_plain }} {{ form.time|widget }} {% if form.time.errors %}
    {% for e in form.time.errors %}
  • {{ e }}
  • {% endfor %}
{% endif %}
{{ form.play_at|widget }} {% if form.play_at.errors %}
    {% for e in form.play_at.errors %}
  • {{ e }}
  • {% endfor %}
{% endif %}
    {% for e in form.non_field_errors %}
  • {{ e }}
  • {% endfor %}
{% empty %}

{% trans "No match on this day is waiting for a time and a ground." %}

{% endfor %} {% endblock %}