From 87fff789441bd2e06f896e2213f3e9b9ad1f84ac Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 4 Oct 2021 19:30:54 +0200 Subject: [PATCH] navigtion-mixin icon setting --- InvenTree/plugins/integration.py | 6 ++++++ InvenTree/templates/navbar.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugins/integration.py b/InvenTree/plugins/integration.py index fdc2ed2105..628293dfbb 100644 --- a/InvenTree/plugins/integration.py +++ b/InvenTree/plugins/integration.py @@ -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""" diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index 754f1739ae..4f0e131541 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -65,7 +65,7 @@ {% if navigation %}