2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

navigtion-mixin icon setting

This commit is contained in:
Matthias
2021-10-04 19:30:54 +02:00
parent a5c7676be6
commit 87fff78944
2 changed files with 7 additions and 1 deletions

View File

@ -145,6 +145,7 @@ class UrlsMixin:
class NavigationMixin:
"""Mixin that enables adding navigation links with the plugin"""
NAVIGATION_TAB_NAME = None
NAVIGATION_TAB_ICON = "fas fa-question"
class Meta:
"""meta options for this mixin"""
@ -182,6 +183,11 @@ class NavigationMixin:
name = self.human_name
return name
@property
def navigation_icon(self):
"""icon for navigation tab"""
return getattr(self, 'NAVIGATION_TAB_ICON', "fas fa-question")
class AppMixin:
"""Mixin that enables full django app functions for a plugin"""