1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-26 01:07:35 +02:00
This commit is contained in:
Yohann D'ANELLO
2020-05-04 22:27:45 +02:00
parent ac2790d327
commit 9499e10524
5 changed files with 39 additions and 9 deletions

View File

@ -26,13 +26,17 @@
</dl>
</div>
{% if user.admin or user in team.tournament.organizers.all %}
{% if user.admin or user in team.tournament.organizers.all or team == user.team %}
<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 %}
{% if team.invalid %}
<form method="post">
{% csrf_token %}
<button name="delete" class="btn btn-danger">{% trans "Delete team" %}</button>
{% if user.admin %}
<button name="delete" class="btn btn-danger">{% trans "Delete team" %}</button>
{% elif team == user.team %}
<button name="leave" class="btn btn-danger">{% trans "Leave this team" %}</button>
{% endif %}
</form>
{% endif %}
</div>