mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 05:42:22 +00:00
69 lines
2.8 KiB
HTML
69 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% load getconfig i18n django_tables2 static %}
|
|
|
|
{% block content %}
|
|
<div class="card bg-light shadow">
|
|
<div class="card-header text-center">
|
|
<h4>{% trans "Team" %} {{ team.name }}</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<dl class="row">
|
|
<dt class="col-xl-6 text-right">{% trans 'name'|capfirst %}</dt>
|
|
<dd class="col-xl-6">{{ team.name }}</dd>
|
|
|
|
<dt class="col-xl-6 text-right">{% trans 'trigram'|capfirst %}</dt>
|
|
<dd class="col-xl-6">{{ team.trigram }}</dd>
|
|
|
|
<dt class="col-xl-6 text-right">{% trans 'tournament'|capfirst %}</dt>
|
|
<dd class="col-xl-6">{{ team.tournament }}</dd>
|
|
|
|
<dt class="col-xl-6 text-right">{% trans 'coachs'|capfirst %}</dt>
|
|
<dd class="col-xl-6">{% autoescape off %}{{ team.linked_encadrants|join:", " }}{% endautoescape %}</dd>
|
|
|
|
<dt class="col-xl-6 text-right">{% trans 'participants'|capfirst %}</dt>
|
|
<dd class="col-xl-6">{% autoescape off %}{{ team.linked_participants|join:", " }}{% endautoescape %}</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
{% if user.admin or user in team.tournament.organizers.all %}
|
|
<div class="card-footer text-center">
|
|
<a href="{% url "tournament:team_update" pk=team.pk %}"><button class="btn btn-secondary">{% trans "Edit team" %}</button></a>
|
|
{% if user.admin and team.invalid %}
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<button name="delete" class="btn btn-danger">{% trans "Delete team" %}</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<h4>{% trans "Documents" %}</h4>
|
|
|
|
{% if team.motivation_letters.count %}
|
|
<div class="alert alert-info">
|
|
<strong>{% blocktrans %}Motivation letter:{% endblocktrans %}</strong>
|
|
<a data-turbolinks="false" href="{% url "document" file=team.motivation_letters.last.file %}">{% trans "Download" %}</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if team.solutions.count %}
|
|
<div class="alert alert-info">
|
|
<ul>
|
|
{% for solution in team.solutions.all %}
|
|
<li><strong>{{ solution }} :</strong> <a data-turbolinks="false" href="{% url "document" file=solution.file %}">{% trans "Download" %}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div class="text-center">
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<button class="btn btn-success" name="zip">{% trans "Download solutions as ZIP" %}</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|