2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Adds 'locate item' and 'locate location' buttons

This commit is contained in:
Oliver Walters
2022-05-09 22:48:26 +10:00
parent 256af802e2
commit 4704db5183
4 changed files with 23 additions and 1 deletions

View File

@ -44,6 +44,12 @@ def mixin_enabled(plugin, key, *args, **kwargs):
"""
return plugin.mixin_enabled(key)
@register.simple_tag()
def mixin_available(mixin, *args, **kwargs):
"""
Returns True if there is at least one active plugin which supports the provided mixin
"""
return len(registry.with_mixin(mixin)) > 0
@register.simple_tag()
def navigation_enabled(*args, **kwargs):