1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 05:58:25 +02:00

Implement final selection

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-04-07 11:40:58 +02:00
parent 7732a737bb
commit 1493df0078
15 changed files with 657 additions and 310 deletions

View File

@ -60,6 +60,19 @@
{% endfor %}
</dd>
{% if team.participation.final %}
<dt class="col-sm-6 text-end">{% trans "Photo authorizations (final):" %}</dt>
<dd class="col-sm-6">
{% for participant in team.participants.all %}
{% if participant.photo_authorization_final %}
<a href="{{ participant.photo_authorization_final.url }}">{{ participant }}</a>{% if not forloop.last %},{% endif %}
{% else %}
{{ participant }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %}
{% endif %}
{% endfor %}
</dd>
{% endif %}
{% if not team.participation.tournament.remote %}
<dt class="col-sm-6 text-end">{% trans "Health sheets:" %}</dt>
<dd class="col-sm-6">
@ -99,6 +112,21 @@
{% endif %}
{% endfor %}
</dd>
{% if team.participation.final %}
<dt class="col-sm-6 text-end">{% trans "Parental authorizations (final):" %}</dt>
<dd class="col-sm-6">
{% for student in team.students.all %}
{% if student.under_18_final %}
{% if student.parental_authorization_final %}
<a href="{{ student.parental_authorization_final.url }}">{{ student }}</a>{% if not forloop.last %},{% endif %}
{% else %}
{{ student }} ({% trans "Not uploaded yet" %}){% if not forloop.last %},{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</dd>
{% endif %}
{% endif %}
<dt class="col-sm-6 text-end">{% trans "Motivation letter:" %}</dt>

View File

@ -103,7 +103,24 @@
<div class="card-body">
<ul>
{% for participation, note in notes %}
<li><strong>{{ participation.team }} :</strong> {{ note|floatformat }}</li>
<li>
<strong>{{ participation.team }} :</strong> {{ note|floatformat }}
{% if participation.final %}
<span class="badge badge-sm bg-warning">
<i class="fas fa-medal"></i>
{% trans "Selected for final tournament" %}
</span>
{% endif %}
{% if user.registration.is_admin or user.registration in tournament.organizers.all %}
{% if team_selectable_for_final == participation %}
<a href="{% url 'participation:select_team_final' pk=tournament.pk participation_id=participation.pk %}"
class="badge badge-sm bg-success">
<i class="fas fa-medal"></i>
{% trans "Select for final tournament" %}
</a>
{% endif %}
{% endif %}
</li>
{% endfor %}
</ul>
</div>