From 41ce66df6e0f1f8ad8852c280ec95ef40abbbe36 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 16 Oct 2021 00:32:48 +0200 Subject: [PATCH] add navigation setting --- InvenTree/common/models.py | 6 ++++++ InvenTree/templates/InvenTree/settings/plugin.html | 8 ++++++++ InvenTree/templates/navbar.html | 3 +++ 3 files changed, 17 insertions(+) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 2f32831c8e..848e4e9b0a 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -855,6 +855,12 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'choices': settings_group_options }, + 'ENABLE_PLUGINS_NAVIGATION': { + 'name': _('Enable navigation integration'), + 'description': _('Enable plugins to integrate into navigation'), + 'default': False, + 'validator': bool, + }, **settings.INTEGRATION_PLUGIN_SETTINGS, } diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html index c517b72917..8b4f03bbea 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -12,6 +12,14 @@ {% block content %} + + + {% include "InvenTree/settings/header.html" %} + + {% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_NAVIGATION" %} + +
+

{% trans "Plugin list" %}

diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index 493151dbe7..c2f6038041 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -4,6 +4,7 @@ {% load i18n %} {% settings_value 'BARCODE_ENABLE' as barcodes %} +{% settings_value 'ENABLE_PLUGINS_NAVIGATION' as plugin_nav %}