From 1372c866091dd898a01e3e68b4ee2176af19870b Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Fri, 6 Dec 2024 10:14:45 +0100 Subject: [PATCH] Add api and administration links to navigations --- app/templates/_base/dropdowns.html.j2 | 19 +++++++++++++++++++ app/templates/_base/sidenav.html.j2 | 18 ++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/app/templates/_base/dropdowns.html.j2 b/app/templates/_base/dropdowns.html.j2 index c648235d..616b0103 100644 --- a/app/templates/_base/dropdowns.html.j2 +++ b/app/templates/_base/dropdowns.html.j2 @@ -56,5 +56,24 @@ Log out + {% if current_user.can('USE_API') or current_user.is_administrator %} +
  • + {% endif %} + {% if current_user.can('USE_API') %} +
  • + + api + API + +
  • + {% endif %} + {% if current_user.is_administrator %} +
  • + + admin_panel_settings + Administration + +
  • + {% endif %} {% endif %} diff --git a/app/templates/_base/sidenav.html.j2 b/app/templates/_base/sidenav.html.j2 index 1d1a8e34..56b08dfe 100644 --- a/app/templates/_base/sidenav.html.j2 +++ b/app/templates/_base/sidenav.html.j2 @@ -105,19 +105,21 @@ {% endif %} - {% if current_user.is_authenticated and current_user.can('ADMINISTRATE') %} - {# administration section #} + {% if current_user.can('USE_API') or current_user.is_administrator %}
  • -
  • Administration
  • + {% endif %} - {# corpora #} + {% if current_user.can('USE_API') %} + {# API #}
  • - ICorpora + apiAPI
  • + {% endif %} - {# users #} -
  • - manage_accountsUsers + {% if current_user.is_administrator %} + {# Administration #} +
  • + admin_panel_settingsAdministration
  • {% endif %}