mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 18:38:26 +02:00
My team
This commit is contained in:
@ -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 %}
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user