Skip to content

Commit 64d2627

Browse files
committed
Allow teams to download all samples/attachments
We already allow this over the API so use the same URL.
1 parent b657598 commit 64d2627

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

webapp/templates/partials/problem_list.html.twig

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44

55
<h1 class="mt-4 text-center">
66
{{ contest.name | default('Contest') }} problems
7-
{% if contest and show_contest_problemset and contest.contestProblemsetType is not empty %}
8-
{% if contest_problemset_add_cid %}
9-
{% set contest_problemset_url = path(contest_problemset_path, {'cid': contest.cid}) %}
10-
{% else %}
11-
{% set contest_problemset_url = path(contest_problemset_path) %}
7+
{% if contest and show_contest_problemset %}
8+
{% if contest.contestProblemsetType is not empty %}
9+
{% if contest_problemset_add_cid %}
10+
{% set contest_problemset_url = path(contest_problemset_path, {'cid': contest.cid}) %}
11+
{% else %}
12+
{% set contest_problemset_url = path(contest_problemset_path) %}
13+
{% endif %}
14+
<a class="btn btn-secondary" role="button"
15+
href="{{ contest_problemset_url }}">
16+
<i class="fas fa-file-{{ contest.contestProblemsetType }}"></i>
17+
problemset
18+
</a>
1219
{% endif %}
13-
<a class="btn btn-secondary" role="button"
14-
href="{{ contest_problemset_url }}">
15-
<i class="fas fa-file-{{ contest.contestProblemsetType }}"></i>
16-
problemset
20+
<a class="btn btn-secondary" href="{{ path('current_samples_data_zip', {cid: contest.cid}) }}" title="Contains samples, attachments and statement for all problems.">
21+
<i class="fas fa-download"></i> samples
1722
</a>
1823
{% endif %}
1924
</h1>

0 commit comments

Comments
 (0)