Skip to content

Commit 1f77c9a

Browse files
committed
Allow teams to request clarifications before the contest
We allow via the API, this just makes the behaviour uniform.
1 parent 4706e75 commit 1f77c9a

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% if clarifications is not empty or always_display %}
2+
<h1 class="teamoverview">Clarifications</h1>
3+
{% if clarifications is empty %}
4+
<p class="nodata">No clarifications.</p>
5+
{% else %}
6+
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
7+
{% endif %}
8+
{% endif %}
9+
10+
<h1 class="teamoverview">Clarification Requests</h1>
11+
{% if clarificationRequests is empty %}
12+
<p class="nodata">No clarification request.</p>
13+
{% else %}
14+
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarificationRequests} %}
15+
{% endif %}
16+
17+
<div class="m-1">
18+
<a href="{{ path('team_clarification_add') }}" class="btn btn-secondary btn-sm" data-ajax-modal data-ajax-modal-after="initModalClarificationPreviewAdd">
19+
Request clarification
20+
</a>
21+
</div>
22+

webapp/templates/team/partials/index_content.html.twig

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
<h2 id="contestnotstarted" class="text-center">
77
Contest {{ contest | printContestStart }}
88
</h2>
9-
{% if clarifications is not empty %}
10-
<h1 class="teamoverview">Clarifications</h1>
11-
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
12-
{% endif %}
9+
10+
{% include 'team/partials/clarifications_team.html.twig' with {'always_display': false} %}
1311
{% else %}
1412

1513
<div id="teamscoresummary">
@@ -30,26 +28,9 @@
3028

3129
{% include 'team/partials/submission_list.html.twig' %}
3230
</div>
33-
<div class="col">
34-
<h1 class="teamoverview">Clarifications</h1>
35-
{% if clarifications is empty %}
36-
<p class="nodata">No clarifications.</p>
37-
{% else %}
38-
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
39-
{% endif %}
4031

41-
<h1 class="teamoverview">Clarification Requests</h1>
42-
{% if clarificationRequests is empty %}
43-
<p class="nodata">No clarification request.</p>
44-
{% else %}
45-
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarificationRequests} %}
46-
{% endif %}
47-
48-
<div class="m-1">
49-
<a href="{{ path('team_clarification_add') }}" class="btn btn-secondary btn-sm" data-ajax-modal data-ajax-modal-after="initModalClarificationPreviewAdd">
50-
Request clarification
51-
</a>
52-
</div>
32+
<div class="col">
33+
{% include 'team/partials/clarifications_team.html.twig' with {'always_display': true} %}
5334
</div>
5435
</div>
5536
{% endif %}

0 commit comments

Comments
 (0)