2021-01-13 16:00:50 +00:00
|
|
|
{% extends "base.html" %}
|
2021-01-14 13:44:12 +00:00
|
|
|
|
2021-01-14 18:33:56 +00:00
|
|
|
{% load django_tables2 i18n %}
|
2021-01-14 13:44:12 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2023-02-20 22:02:09 +00:00
|
|
|
<div class="card bg-body shadow">
|
2021-01-14 13:44:12 +00:00
|
|
|
<div class="card-header text-center">
|
2024-03-31 19:36:09 +00:00
|
|
|
<h4>
|
|
|
|
{{ pool }}
|
|
|
|
{% if user.registration.is_admin or user.registration in pool.tournament.organizers.all %}
|
|
|
|
<button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#updatePoolModal">
|
|
|
|
<i class="fas fa-edit"></i>
|
|
|
|
{% trans "Update" %}
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
</h4>
|
2021-01-14 13:44:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<dl class="row">
|
2021-01-14 14:59:11 +00:00
|
|
|
<dt class="col-sm-3">{% trans "Tournament:" %}</dt>
|
2021-01-14 18:23:32 +00:00
|
|
|
<dd class="col-sm-9"><a href="{{ pool.tournament.get_absolute_url }}">{{ pool.tournament }}</a></dd>
|
2021-01-14 13:44:12 +00:00
|
|
|
|
2021-01-14 14:59:11 +00:00
|
|
|
<dt class="col-sm-3">{% trans "Round:" %}</dt>
|
|
|
|
<dd class="col-sm-9">{{ pool.get_round_display }}</dd>
|
2021-01-14 13:44:12 +00:00
|
|
|
|
2023-03-31 15:23:40 +00:00
|
|
|
<dt class="col-sm-3">{% trans "Letter:" %}</dt>
|
|
|
|
<dd class="col-sm-9">{{ pool.get_letter_display }}</dd>
|
2024-04-18 12:53:58 +00:00
|
|
|
|
|
|
|
{% if pool.participations.count == 5 %}
|
|
|
|
<dt class="col-sm-3">{% trans "Room:" %}</dt>
|
|
|
|
<dd class="col-sm-9">{{ pool.get_room_display }}</dd>
|
|
|
|
{% endif %}
|
2023-03-31 15:23:40 +00:00
|
|
|
|
2021-01-14 14:59:11 +00:00
|
|
|
<dt class="col-sm-3">{% trans "Teams:" %}</dt>
|
|
|
|
<dd class="col-sm-9">
|
2021-01-14 13:44:12 +00:00
|
|
|
{% for participation in pool.participations.all %}
|
2023-02-20 12:42:36 +00:00
|
|
|
<a href="{{ participation.get_absolute_url }}">{{ participation.team }}{% if not forloop.last %}, {% endif %}</a>
|
2021-01-14 13:44:12 +00:00
|
|
|
{% endfor %}
|
|
|
|
</dd>
|
|
|
|
|
2021-01-14 14:59:11 +00:00
|
|
|
<dt class="col-sm-3">{% trans "Juries:" %}</dt>
|
2023-04-05 14:54:16 +00:00
|
|
|
<dd class="col-sm-9">
|
|
|
|
{{ pool.juries.all|join:", " }}
|
2024-03-23 10:23:02 +00:00
|
|
|
<a class="badge rounded-pill text-bg-info" href="{% url 'participation:pool_jury' pk=pool.pk %}">
|
2024-03-24 21:22:16 +00:00
|
|
|
<i class="fas fa-plus"></i> {% trans "Edit jury" %}
|
2023-04-05 14:54:16 +00:00
|
|
|
</a>
|
|
|
|
</dd>
|
2021-01-14 14:59:11 +00:00
|
|
|
|
|
|
|
<dt class="col-sm-3">{% trans "Defended solutions:" %}</dt>
|
|
|
|
<dd class="col-sm-9">
|
|
|
|
{% for passage in pool.passages.all %}
|
2023-05-19 12:44:31 +00:00
|
|
|
<a href="{{ passage.defended_solution.file.url }}">{{ passage.defender.team.trigram }} — {{ passage.get_solution_number_display }}</a>{% if not forloop.last %}, {% endif %}
|
2021-01-14 14:59:11 +00:00
|
|
|
{% endfor %}
|
2024-03-26 23:49:32 +00:00
|
|
|
<a href="{% url 'participation:pool_download_solutions' pool_id=pool.id %}" class="badge rounded-pill text-bg-secondary">
|
2023-05-19 12:44:31 +00:00
|
|
|
<i class="fas fa-download"></i> {% trans "Download all" %}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="col-sm-3">{% trans "Syntheses:" %}</dt>
|
|
|
|
<dd class="col-sm-9">
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
{% for passage in pool.passages.all %}
|
|
|
|
<li class="list-group-item">
|
|
|
|
{{ passage.defender.team.trigram }} — {{ passage.get_solution_number_display }} :
|
|
|
|
{% for synthesis in passage.syntheses.all %}
|
|
|
|
<a href="{{ synthesis.file.url }}">{{ synthesis.participation.team.trigram }} ({{ synthesis.get_type_display }})</a>{% if not forloop.last %}, {% endif %}
|
|
|
|
{% empty %}
|
|
|
|
{% trans "No synthesis was uploaded yet." %}
|
|
|
|
{% endfor %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2024-03-26 23:49:32 +00:00
|
|
|
<a href="{% url 'participation:pool_download_syntheses' pool_id=pool.id %}" class="badge rounded-pill text-bg-secondary">
|
2023-05-19 12:44:31 +00:00
|
|
|
<i class="fas fa-download"></i> {% trans "Download all" %}
|
|
|
|
</a>
|
2021-01-14 14:59:11 +00:00
|
|
|
</dd>
|
2021-01-21 21:32:43 +00:00
|
|
|
|
2024-03-31 19:23:57 +00:00
|
|
|
{% if pool.bbb_url %}
|
|
|
|
<dt class="col-sm-3">{% trans "BigBlueButton link:" %}</dt>
|
|
|
|
<dd class="col-sm-9">{{ pool.bbb_url|urlize }}</dd>
|
|
|
|
{% endif %}
|
2024-03-30 18:15:21 +00:00
|
|
|
|
|
|
|
{% if user.registration.is_admin or user.registration.is_volunteer %}
|
|
|
|
{% if user.registration.is_admin or user.registration in pool.tournament.organizers.all or user.registration == pool.jury_president %}
|
2024-03-31 19:23:57 +00:00
|
|
|
<dt class="col-sm-3">{% trans "Notation sheets:" %}</dt>
|
|
|
|
<dd class="col-sm-9">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-info" href="{% url 'participation:pool_scale_note_sheet' pk=pool.pk %}">
|
|
|
|
<i class="fas fa-download"></i>
|
2024-04-18 12:53:58 +00:00
|
|
|
{% trans "Download the scale sheet" %}
|
2024-03-31 19:23:57 +00:00
|
|
|
</a>
|
|
|
|
<a class="btn btn-sm btn-info" href="{% url 'participation:pool_final_note_sheet' pk=pool.pk %}">
|
|
|
|
<i class="fas fa-download"></i>
|
2024-04-18 12:53:58 +00:00
|
|
|
{% trans "Download the final notation sheet" %}
|
2024-03-31 19:23:57 +00:00
|
|
|
</a>
|
|
|
|
<a class="btn btn-sm btn-info" href="{% url 'participation:pool_notation_sheets' pool_id=pool.id %}">
|
|
|
|
<i class="fas fa-archive"></i>
|
|
|
|
{% trans "Download all notation sheets" %}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="col-sm-3">{% trans "Google Sheets Spreadsheet:" %}</dt>
|
2024-03-30 18:15:21 +00:00
|
|
|
<dd class="col-sm-9">
|
2024-03-31 19:23:57 +00:00
|
|
|
<a class="btn btn-sm btn-success" href="https://docs.google.com/spreadsheets/d/{{ pool.tournament.notes_sheet_id }}/edit">
|
2024-03-30 18:15:21 +00:00
|
|
|
<i class="fas fa-table"></i>
|
|
|
|
{% trans "Go to the Google Sheets page of the pool" %}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2021-01-14 13:44:12 +00:00
|
|
|
</dl>
|
2021-01-14 18:23:32 +00:00
|
|
|
|
2023-02-20 22:02:09 +00:00
|
|
|
<div class="card bg-body shadow">
|
2021-01-14 18:23:32 +00:00
|
|
|
<div class="card-header text-center">
|
|
|
|
<h5>{% trans "Ranking" %}</h5>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<ul>
|
|
|
|
{% for participation, note in notes %}
|
2021-04-10 12:38:15 +00:00
|
|
|
<li><strong>{{ participation.team }} :</strong> {{ note|floatformat }}</li>
|
2021-01-14 18:23:32 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2024-03-31 19:23:57 +00:00
|
|
|
{% if user.registration.is_admin or user.registration.is_volunteer %}
|
|
|
|
{% if user.registration.is_admin or user.registration in pool.tournament.organizers.all or user.registration == pool.jury_president %}
|
|
|
|
<div class="card-footer text-center">
|
|
|
|
<div class="btn btn-group">
|
|
|
|
<button class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#uploadNotesModal">
|
|
|
|
<i class="fas fa-upload"></i>
|
2024-04-07 07:34:52 +00:00
|
|
|
{% trans "Upload notes from a spreadsheet file" %}
|
2024-03-31 19:23:57 +00:00
|
|
|
</button>
|
|
|
|
<a class="btn btn-sm btn-info" href="{% url 'participation:pool_notes_template' pk=pool.pk %}">
|
|
|
|
<i class="fas fa-download"></i>
|
|
|
|
{% trans "Download notation spreadsheet" %}
|
2023-04-06 21:58:59 +00:00
|
|
|
</a>
|
2024-03-31 19:23:57 +00:00
|
|
|
</div>
|
2023-04-06 21:58:59 +00:00
|
|
|
</div>
|
2024-03-31 19:23:57 +00:00
|
|
|
{% endif %}
|
2023-04-06 21:38:03 +00:00
|
|
|
{% endif %}
|
2021-01-14 18:23:32 +00:00
|
|
|
</div>
|
2021-01-14 13:44:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-01-14 18:33:56 +00:00
|
|
|
<hr>
|
|
|
|
|
|
|
|
<h3>{% trans "Passages" %}</h3>
|
|
|
|
|
|
|
|
{% render_table passages %}
|
|
|
|
|
2021-01-14 13:44:12 +00:00
|
|
|
{% trans "Update pool" as modal_title %}
|
|
|
|
{% trans "Update" as modal_button %}
|
|
|
|
{% url "participation:pool_update" pk=pool.pk as modal_action %}
|
|
|
|
{% include "base_modal.html" with modal_id="updatePool" %}
|
|
|
|
|
2022-05-15 10:23:17 +00:00
|
|
|
{% trans "Upload notes" as modal_title %}
|
|
|
|
{% trans "Upload" as modal_button %}
|
|
|
|
{% url "participation:pool_upload_notes" pk=pool.pk as modal_action %}
|
|
|
|
{% include "base_modal.html" with modal_id="uploadNotes" modal_button_type="success" modal_enctype="multipart/form-data" %}
|
2021-01-14 13:44:12 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extrajavascript %}
|
|
|
|
<script>
|
2023-02-20 15:55:30 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
initModal("updatePool", "{% url "participation:pool_update" pk=pool.pk %}")
|
|
|
|
initModal("uploadNotes", "{% url "participation:pool_upload_notes" pk=pool.pk %}")
|
|
|
|
})
|
2021-01-14 13:44:12 +00:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|