From 6541dc43ecc8a088c58bfcdb40ae03aa11a8530e Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 11 Jan 2022 13:46:50 +1100 Subject: [PATCH] Template fixes --- InvenTree/templates/InvenTree/settings/settings.html | 6 ++++-- InvenTree/templates/InvenTree/settings/sidebar.html | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/InvenTree/templates/InvenTree/settings/settings.html b/InvenTree/templates/InvenTree/settings/settings.html index e559f6ff7f..5fcd18644f 100644 --- a/InvenTree/templates/InvenTree/settings/settings.html +++ b/InvenTree/templates/InvenTree/settings/settings.html @@ -40,7 +40,8 @@ {% include "InvenTree/settings/po.html" %} {% include "InvenTree/settings/so.html" %} -{% if plugins_enabled %} +{% plugins_enabled as plug %} +{% if plug %} {% include "InvenTree/settings/plugin.html" %} {% plugin_list as pl_list %} {% for plugin_key, plugin in pl_list.items %} @@ -335,7 +336,8 @@ $("#import-part").click(function() { launchModalForm("{% url 'api-part-import' %}?reset", {}); }); -{% if plugins_enabled %} +{% plugins_enabled as plug %} +{% if plug %} $("#install-plugin").click(function() { installPlugin(); }); diff --git a/InvenTree/templates/InvenTree/settings/sidebar.html b/InvenTree/templates/InvenTree/settings/sidebar.html index 281555ff5c..b17b226f28 100644 --- a/InvenTree/templates/InvenTree/settings/sidebar.html +++ b/InvenTree/templates/InvenTree/settings/sidebar.html @@ -47,7 +47,8 @@ {% trans "Sales Orders" as text %} {% include "sidebar_item.html" with label='sales-order' text=text icon="fa-truck" %} -{% if plugins_enabled %} +{% plugins_enabled as plug %} +{% if plug %} {% include "sidebar_header.html" with text="Plugin Settings" %} {% include "sidebar_item.html" with label='plugin' text="Plugins" icon="fa-plug" %}