From 5cbc72b41f653c0b1cc50ea0466cc53ddb5390d4 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Fri, 23 Feb 2024 21:48:39 +0100 Subject: [PATCH] Teams tab is only accessible to admins Signed-off-by: Emmy D'Anello --- tfjm/templates/base.html | 4 ---- tfjm/templates/navbar.html | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tfjm/templates/base.html b/tfjm/templates/base.html index 383edbe..5676f68 100644 --- a/tfjm/templates/base.html +++ b/tfjm/templates/base.html @@ -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") diff --git a/tfjm/templates/navbar.html b/tfjm/templates/navbar.html index 00a0127..8e0115d 100644 --- a/tfjm/templates/navbar.html +++ b/tfjm/templates/navbar.html @@ -21,12 +21,12 @@ {% trans "Tournaments" %} - {% if user.is_authenticated and user.registration.is_volunteer %} + {% if user.is_authenticated and user.registration.is_admin %} {% elif user.is_authenticated and user.registration.participates %} {% if not user.registration.team %}