Skip to content
Snippets Groups Projects
Commit 2760c623 authored by Jan Prachař's avatar Jan Prachař
Browse files

org_contest: Tlačítko na přepnutí stavu soutěže

parent eaefb755
No related branches found
No related tags found
1 merge request!68org_contest: Tlačítko na přepnutí stavu soutěže
This commit is part of merge request !68. Comments created here will be created in the context of that merge request.
......@@ -373,6 +373,7 @@ def org_contest(id: int, site_id: Optional[int] = None):
can_create_solutions=rr.can_upload_feedback() or rr.can_upload_solutions(),
can_view_statement=rr.can_view_statement(),
tasks=tasks, places_counts=places_counts,
edit_form=ContestEditForm(obj=contest),
)
......
......@@ -20,6 +20,21 @@
<tr><td>Stav<td><span class='rstate-{{state.name}}'>{{ state.friendly_name() }}</span>
{% if round.state != RoundState.delegate %}
(určeno nastavením kola)
{% elif can_manage and not site %}
{% if state == RoundState.running %}
<form method="post" action="{{ url_for('org_contest_edit', id=contest.contest_id) }}" style="display: inline-block">
{{ edit_form.csrf_token }}
<button type="submit" class="btn btn-sm btn-default">Změnit na: opravuje se</button>
<input type="hidden" name="state" value="{{ RoundState.grading.name }}">
</form>
{% elif state == RoundState.grading %}
<form method="post" action="{{ url_for('org_contest_edit', id=contest.contest_id) }}" style="display: inline-block">
{{ edit_form.csrf_token }}
<button type="submit" class="btn btn-sm btn-default">Změnit na: ukončeno</button>
<input type="hidden" name="state" value="{{ RoundState.closed.name }}">
</form>
{% endif %}
{% else %}
{% endif %}
{% endwith %}
{% with state=contest.ct_state() %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment