Skip to content

Commit b793bec

Browse files
Re-use toggles on contest page for problems.
1 parent b24ade1 commit b793bec

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

webapp/templates/jury/contest.html.twig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,12 @@
393393
<td><a href="{{ link }}">{{ problem.problem.name }}</a></td>
394394
<td><a href="{{ link }}">{{ problem.shortname }}</a></td>
395395
<td><a href="{{ link }}">{{ problem.points }}</a></td>
396-
<td><a href="{{ link }}">{{ problem.allowSubmit | printYesNo }}</a></td>
397-
<td><a href="{{ link }}">{{ problem.allowJudge | printYesNo }}</a></td>
396+
<td>
397+
{% include 'jury/partials/problem_toggle.html.twig' with {contestProblem: problem, type: 'submit', enabled: problem.allowSubmit} %}
398+
</td>
399+
<td>
400+
{% include 'jury/partials/problem_toggle.html.twig' with {contestProblem: problem, type: 'judge', enabled: problem.allowJudge} %}
401+
</td>
398402
{% if problem.color is empty %}
399403
<td><a href="{{ link }}">&nbsp;</a></td>
400404
{% else %}

webapp/templates/jury/problem.html.twig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,10 @@
164164
<a href="{{ link }}">{{ contestProblem.shortname }}</a>
165165
</td>
166166
<td>
167-
<a href="{{ link }}">
168-
{% include 'jury/partials/problem_toggle.html.twig' with {type: 'submit', enabled: contestProblem.allowSubmit} %}
169-
</a>
167+
{% include 'jury/partials/problem_toggle.html.twig' with {type: 'submit', enabled: contestProblem.allowSubmit} %}
170168
</td>
171169
<td>
172-
<a href="{{ link }}">
173-
{% include 'jury/partials/problem_toggle.html.twig' with {type: 'judge', enabled: contestProblem.allowJudge} %}
174-
</a>
170+
{% include 'jury/partials/problem_toggle.html.twig' with {type: 'judge', enabled: contestProblem.allowJudge} %}
175171
</td>
176172
{% if contestProblem.color is empty %}
177173
<td><a href="{{ link }}">&nbsp;</a></td>

0 commit comments

Comments
 (0)