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

Add some forms

This commit is contained in:
Yohann D'ANELLO
2020-05-04 20:21:53 +02:00
parent 97e5a0dfdd
commit 5ebf258eab
17 changed files with 285 additions and 26 deletions

View File

@ -19,18 +19,21 @@
<dd class="col-xl-6">{{ team.tournament }}</dd>
<dt class="col-xl-6 text-right">{% trans 'coachs'|capfirst %}</dt>
<dd class="col-xl-6">{{ team.encadrants.all|join:", " }}</dd>
<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">{{ team.participants.all|join:", " }}</dd>
<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">
<button class="btn btn-secondary">{% trans "Edit team" %}</button>
<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 %}
<button class="btn btn-danger">{% trans "Delete team" %}</button>
<form method="post">
{% csrf_token %}
<button name="delete" class="btn btn-danger">{% trans "Delete team" %}</button>
</form>
{% endif %}
</div>
{% endif %}