mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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 import template
|
||||
|
||||
from common.models import InvenTreeSetting
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@ -25,3 +27,10 @@ def plugin_settings(plugin, *args, **kwargs):
|
||||
def mixin_enabled(plugin, key, *args, **kwargs):
|
||||
""" Return if the mixin is existant and configured in the plugin """
|
||||
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 %}
|
||||
|
||||
{% 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 ">
|
||||
<div class="container-fluid">
|
||||
|
Loading…
Reference in New Issue
Block a user