mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add navigation setting
This commit is contained in:
parent
32122102e6
commit
41ce66df6e
@ -855,6 +855,12 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
|||||||
'choices': settings_group_options
|
'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,
|
**settings.INTEGRATION_PLUGIN_SETTINGS,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,14 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
<table class='table table-striped table-condensed'>
|
||||||
|
{% include "InvenTree/settings/header.html" %}
|
||||||
|
<tbody>
|
||||||
|
{% include "InvenTree/settings/setting.html" with key="ENABLE_PLUGINS_NAVIGATION" %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h4>{% trans "Plugin list" %}</h4>
|
<h4>{% trans "Plugin list" %}</h4>
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
||||||
|
{% settings_value 'ENABLE_PLUGINS_NAVIGATION' as plugin_nav %}
|
||||||
|
|
||||||
<nav class="navbar navbar-xs navbar-default navbar-fixed-top ">
|
<nav class="navbar navbar-xs navbar-default navbar-fixed-top ">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@ -49,6 +50,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if plugin_nav %}
|
||||||
{% plugin_list as pl_list %}
|
{% plugin_list as pl_list %}
|
||||||
{% for plugin_key, plugin in pl_list.items %}
|
{% for plugin_key, plugin in pl_list.items %}
|
||||||
{% mixin_enabled plugin 'navigation' as navigation %}
|
{% mixin_enabled plugin 'navigation' as navigation %}
|
||||||
@ -64,6 +66,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
Loading…
Reference in New Issue
Block a user