Teams tab is only accessible to admins
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
de504398d2
commit
5cbc72b41f
|
@ -68,9 +68,6 @@
|
|||
{% include "base_modal.html" with modal_id="tournamentList" modal_additional_class="modal-lg" %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
{% trans "All teams" as modal_title %}
|
||||
{% include "base_modal.html" with modal_id="teams" modal_additional_class="modal-lg" %}
|
||||
|
||||
{% trans "Search results" as modal_title %}
|
||||
{% include "base_modal.html" with modal_id="search" modal_form_method="get" modal_additional_class="modal-lg" %}
|
||||
|
||||
|
@ -101,7 +98,6 @@
|
|||
initModal("tournamentList", "{% url "participation:tournament_list" %}")
|
||||
|
||||
{% if user.is_authenticated and user.registration.is_admin %}
|
||||
initModal("teams", "{% url "participation:team_list" %}")
|
||||
initModal("search",
|
||||
() => "{% url "haystack_search" %}?q=" + encodeURI(document.getElementById("search-term").value),
|
||||
"search-results")
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
<i class="fas fa-calendar-day"></i> {% trans "Tournaments" %}
|
||||
</a>
|
||||
</li>
|
||||
{% if user.is_authenticated and user.registration.is_volunteer %}
|
||||
{% if user.is_authenticated and user.registration.is_admin %}
|
||||
<li class="nav-item active">
|
||||
<a href="{% url "registration:user_list" %}" class="nav-link"><i class="fas fa-user"></i> {% trans "Users" %}</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a href="#" class="nav-link" data-bs-toggle="modal" data-bs-target="#teamsModal"><i class="fas fa-users"></i> {% trans "Teams" %}</a>
|
||||
<a href="{% url "participation:team_list" %}" class="nav-link"><i class="fas fa-users"></i> {% trans "Teams" %}</a>
|
||||
</li>
|
||||
{% elif user.is_authenticated and user.registration.participates %}
|
||||
{% if not user.registration.team %}
|
||||
|
|
Loading…
Reference in New Issue