From 4a843908ec9b74e076e860ea96d636e95d6c8749 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 27 Apr 2022 21:56:04 +1000 Subject: [PATCH 1/8] Add customize option to hide admin link in user menu --- InvenTree/InvenTree/settings.py | 2 +- InvenTree/config_template.yaml | 1 + InvenTree/templates/navbar.html | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 6e88fe8375..1446c33aad 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -915,7 +915,7 @@ PLUGIN_TESTING_SETUP = get_setting('PLUGIN_TESTING_SETUP', False) # load plugin PLUGIN_RETRY = get_setting('PLUGIN_RETRY', 5) # how often should plugin loading be tried? PLUGIN_FILE_CHECKED = False # Was the plugin file checked? -# user interface customization values +# User interface customization values CUSTOMIZE = get_setting( 'INVENTREE_CUSTOMIZE', CONFIG.get('customize', {}), diff --git a/InvenTree/config_template.yaml b/InvenTree/config_template.yaml index b9d14c4d4b..c60a58d37f 100644 --- a/InvenTree/config_template.yaml +++ b/InvenTree/config_template.yaml @@ -193,3 +193,4 @@ static_root: '/home/inventree/data/static' # login_message: InvenTree demo instance - Click here for login details # navbar_message:
InvenTree demo mode
# logo: logo.png +# hide_admin_link: true diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index d7d70db59f..9b5ddd89a7 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -6,9 +6,10 @@ {% settings_value 'BARCODE_ENABLE' as barcodes %} {% settings_value 'STICKY_HEADER' user=request.user as sticky %} {% navigation_enabled as plugin_nav %} -{% inventree_demo_mode as demo %} + {% inventree_show_about user as show_about %} {% inventree_customize 'navbar_message' as navbar_message %} +{% inventree_customize 'hide_admin_link' as hide_admin_link %}