1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 18:38:26 +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

@ -143,7 +143,7 @@
<ul class="navbar-nav">
{% if "_fake_user_id" in request.session %}
<li class="nav-item active">
<a class="nav-link" href="{% url "member:reset_admin" %}?path={{ request.path }}"><i class="fas fa-cog"></i> {% trans "Return to admin view" %}</a>
<a class="nav-link" href="{% url "member:reset_admin" %}?path={{ request.path }}"><i class="fas fa-tools"></i> {% trans "Return to admin view" %}</a>
</li>
{% endif %}
{% if not user.is_authenticated %}

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>