Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions webapp/templates/team/partials/clarifications_team.html.twig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather reject clar requests before contest start through the API

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So instead of letting teams ask them via UI (because they can via API) disallow both via UI & API?

I think I'm fine with that, I want the jury to still be able to send them via API because of imports and suspected we didn't want the extra branch. I did not really like having to add this to the UI but found consistency important.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% if clarifications is not empty or always_display %}
<h1 class="teamoverview">Clarifications</h1>
{% if clarifications is empty %}
<p class="nodata">No clarifications.</p>
{% else %}
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
{% endif %}
{% endif %}

<h1 class="teamoverview">Clarification Requests</h1>
{% if clarificationRequests is empty %}
<p class="nodata">No clarification request.</p>
{% else %}
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarificationRequests} %}
{% endif %}

<div class="m-1">
<a href="{{ path('team_clarification_add') }}" class="btn btn-secondary btn-sm" data-ajax-modal data-ajax-modal-after="initModalClarificationPreviewAdd">
Request clarification
</a>
</div>

27 changes: 4 additions & 23 deletions webapp/templates/team/partials/index_content.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
<h2 id="contestnotstarted" class="text-center">
Contest {{ contest | printContestStart }}
</h2>
{% if clarifications is not empty %}
<h1 class="teamoverview">Clarifications</h1>
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
{% endif %}

{% include 'team/partials/clarifications_team.html.twig' with {'always_display': false} %}
{% else %}

<div id="teamscoresummary">
Expand All @@ -30,26 +28,9 @@

{% include 'team/partials/submission_list.html.twig' %}
</div>
<div class="col">
<h1 class="teamoverview">Clarifications</h1>
{% if clarifications is empty %}
<p class="nodata">No clarifications.</p>
{% else %}
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
{% endif %}

<h1 class="teamoverview">Clarification Requests</h1>
{% if clarificationRequests is empty %}
<p class="nodata">No clarification request.</p>
{% else %}
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarificationRequests} %}
{% endif %}

<div class="m-1">
<a href="{{ path('team_clarification_add') }}" class="btn btn-secondary btn-sm" data-ajax-modal data-ajax-modal-after="initModalClarificationPreviewAdd">
Request clarification
</a>
</div>
<div class="col">
{% include 'team/partials/clarifications_team.html.twig' with {'always_display': true} %}
</div>
</div>
{% endif %}
Expand Down