mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 14:38:24 +02:00
Pool support
This commit is contained in:
@ -129,6 +129,9 @@
|
||||
<a class="nav-link" href="{% url "tournament:all_syntheses" %}"><i class="fas fa-feather"></i> {% trans "Syntheses" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url "tournament:pools" %}"><i class="fas fa-swimming-pool"></i> {% trans "Pools" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="https://www.helloasso.com/associations/animath/formulaires/5/widget"><i
|
||||
|
70
templates/tournament/pool_detail.html
Normal file
70
templates/tournament/pool_detail.html
Normal file
@ -0,0 +1,70 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load getconfig i18n django_tables2 %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{{ title }}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6 text-right">{% trans 'juries'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ pool.juries.all|join:", " }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'teams'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ pool.teams.all|join:", " }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'round'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ pool.round }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'tournament'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ pool.tournament }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Solutions" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
{% for solution in pool.solutions.all %}
|
||||
<li><a data-turbolinks="false" href="{{ solution.file.url }}">{{ solution }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-success" name="solutions_zip">{% trans "Download ZIP archive" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if user.organizes %}
|
||||
<hr>
|
||||
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Syntheses" %}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
{% for synthesis in pool.syntheses.all %}
|
||||
<li><a data-turbolinks="false" href="{{ synthesis.file.url }}">{{ synthesis }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-success" name="syntheses_zip">{% trans "Download ZIP archive" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
11
templates/tournament/pool_form.html
Normal file
11
templates/tournament/pool_form.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n crispy_forms_filters %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="{% trans "Submit" %}">
|
||||
</form>
|
||||
{% endblock %}
|
12
templates/tournament/pool_list.html
Normal file
12
templates/tournament/pool_list.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n django_tables2 %}
|
||||
|
||||
{% block content %}
|
||||
{% render_table table %}
|
||||
|
||||
{% if user.admin %}
|
||||
<hr>
|
||||
<a href="{% url "tournament:create_pool" %}"><button class="btn btn-secondary btn-block">{% trans "Add pool" %}</button></a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user