mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 13:58:47 +00:00
testing save navigation checks
This commit is contained in:
parent
56d198edb5
commit
487ac594bb
@ -5,6 +5,8 @@
|
|||||||
from django.conf import settings as djangosettings
|
from django.conf import settings as djangosettings
|
||||||
from django import template
|
from django import template
|
||||||
|
|
||||||
|
from common.models import InvenTreeSetting
|
||||||
|
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
@ -25,3 +27,10 @@ def plugin_settings(plugin, *args, **kwargs):
|
|||||||
def mixin_enabled(plugin, key, *args, **kwargs):
|
def mixin_enabled(plugin, key, *args, **kwargs):
|
||||||
""" Return if the mixin is existant and configured in the plugin """
|
""" Return if the mixin is existant and configured in the plugin """
|
||||||
return plugin.mixin_enabled(key)
|
return plugin.mixin_enabled(key)
|
||||||
|
|
||||||
|
@register.simple_tag()
|
||||||
|
def navigation_enabled(*args, **kwargs):
|
||||||
|
"""Return if plugin navigation is enabled"""
|
||||||
|
if djangosettings.TESTING:
|
||||||
|
return True
|
||||||
|
return InvenTreeSetting.get_setting('ENABLE_PLUGINS_NAVIGATION')
|
||||||
|
@ -4,7 +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 %}
|
{% navigation_enabled 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">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user