diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index e2e3d27be0..bcedc95da8 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -400,8 +400,6 @@ -{% include "panel/plugin_panels.html" %} - {% endblock %} {% block js_load %} diff --git a/InvenTree/part/templates/part/part_sidebar.html b/InvenTree/part/templates/part/part_sidebar.html index 18890b82af..1da07aa0c6 100644 --- a/InvenTree/part/templates/part/part_sidebar.html +++ b/InvenTree/part/templates/part/part_sidebar.html @@ -57,6 +57,4 @@ {% trans "Attachments" as text %} {% include "sidebar_item.html" with label="part-attachments" text=text icon="fa-paperclip" %} {% trans "Notes" as text %} -{% include "sidebar_item.html" with label="part-notes" text=text icon="fa-clipboard" %} - -{% include "panel/plugin_menu_items.html" %} \ No newline at end of file +{% include "sidebar_item.html" with label="part-notes" text=text icon="fa-clipboard" %} \ No newline at end of file diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 7dbb17c7d8..0d8272892a 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -83,6 +83,7 @@ {% block sidebar %} {% endblock %} + {% include "plugin/panel_menu.html" %} {% include "sidebar_toggle.html" with target='sidebar' %} @@ -210,7 +211,7 @@ $(document).ready(function () { - {% include "panel/plugin_javascript.html" %} + {% include "plugin/panel_js.html" %} {% block js_ready %} {% endblock %} diff --git a/InvenTree/templates/page_base.html b/InvenTree/templates/page_base.html index 17077700a2..9dcd33912d 100644 --- a/InvenTree/templates/page_base.html +++ b/InvenTree/templates/page_base.html @@ -61,6 +61,8 @@ {% block page_content %} + {% endblock %} +{% include "plugin/panel_content.html" %} {% endblock %} diff --git a/InvenTree/templates/panel/plugin_panels.html b/InvenTree/templates/plugin/panel_content.html similarity index 84% rename from InvenTree/templates/panel/plugin_panels.html rename to InvenTree/templates/plugin/panel_content.html index ddbdbeee45..6b5c4ed90b 100644 --- a/InvenTree/templates/panel/plugin_panels.html +++ b/InvenTree/templates/plugin/panel_content.html @@ -1,5 +1,6 @@ +{% if plugin_panels %} + {% for panel in plugin_panels %} -
@@ -14,5 +15,5 @@ {{ panel.content | safe }}
- -{% endfor %} \ No newline at end of file +{% endfor %} +{% endif %} \ No newline at end of file diff --git a/InvenTree/templates/panel/plugin_javascript.html b/InvenTree/templates/plugin/panel_js.html similarity index 100% rename from InvenTree/templates/panel/plugin_javascript.html rename to InvenTree/templates/plugin/panel_js.html diff --git a/InvenTree/templates/panel/plugin_menu_items.html b/InvenTree/templates/plugin/panel_menu.html similarity index 54% rename from InvenTree/templates/panel/plugin_menu_items.html rename to InvenTree/templates/plugin/panel_menu.html index 2c084a021e..bbbadfdc64 100644 --- a/InvenTree/templates/panel/plugin_menu_items.html +++ b/InvenTree/templates/plugin/panel_menu.html @@ -1,3 +1,6 @@ +{% if plugin_panels %} + {% for panel in plugin_panels %} {% include "sidebar_item.html" with label=panel.key text=panel.title icon=panel.icon %} -{% endfor %} \ No newline at end of file +{% endfor %} +{% endif %} \ No newline at end of file