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

{% icon "list-checks" %}{% trans "Enter results" %}

{{ date|date:"l j F Y" }}

{% blocktrans with season=season.title count counter=match_formset.forms|length %}{{ season }} · {{ counter }} match{% plural %}{{ season }} · {{ counter }} matches{% endblocktrans %}{% if bye_formset.forms %} · {% blocktrans count counter=bye_formset.forms|length %}{{ counter }} bye{% plural %}{{ counter }} byes{% endblocktrans %}{% endif %}

{% csrf_token %} {{ match_formset.management_form }} {{ bye_formset.management_form }}

{% trans "Scores" %}

{% trans "Cancel" %}
{% include "touchtechnology/admin/workbook/_problems.html" with form=None formset=match_formset %} {% regroup match_formset.forms by instance.datetime as times %} {% if times|length > 1 %} {% endif %} {% for slot in times %}

{% icon "clock" %}{{ slot.grouper|time:"H:i"|default:_("No time set") }}

{% for form in slot.list %} {% with match=form.instance %}
{{ match }} {{ form.id }}
{{ match.stage.division.title }} {% if match.label %}{{ match.label }}{% else %}{% blocktrans with num=match.round %}Round {{ num }}{% endblocktrans %}{% endif %} {% icon "map-pin" %} {{ match.play_at.title|default:_("No ground") }} {% if match.home_team_score == None and form.home_team_score %}{% trans "No result yet" %}{% endif %}
{% if form.home_team_score %}
{{ form.home_team_score|control }} {{ form.away_team_score|control }}
{% for field in form %}{% if field.errors %}

{% icon "circle-alert" %}{{ field.errors|join:" " }}

{% endif %}{% endfor %} {% for error in form.non_field_errors %}

{{ error }}

{% endfor %} {% else %}

{{ match }}

{% endif %} {% if form.is_forfeit %}
{% trans "Forfeit?" %}
{% field form.is_forfeit %} {% field form.forfeit_winner %}
{% endif %}
{% endwith %} {% endfor %}
{% empty %}

{% trans "There are no matches to enter results for on this day." %}

{% endfor %} {% if bye_formset.forms %}

{% trans "Byes" %}

{% blocktrans with date=date|date:"j F" %}Process the byes of {{ date }} to update the ladder as configured.{% endblocktrans %}

{% for form in bye_formset.forms %}
{{ form.id }} {% field form.bye_processed %}

{{ form.instance.stage.division.title }}

{% endfor %}
{% endif %}
{% endtimezone %} {% endblock %}