mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 09:46:31 +00:00
Simplify the new template rendering
- No extra template code is required for any new page - All loaded in base.html or page_base.html - Oh, so clean!
This commit is contained in:
@@ -400,8 +400,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include "panel/plugin_panels.html" %}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_load %}
|
{% block js_load %}
|
||||||
|
@@ -57,6 +57,4 @@
|
|||||||
{% trans "Attachments" as text %}
|
{% trans "Attachments" as text %}
|
||||||
{% include "sidebar_item.html" with label="part-attachments" text=text icon="fa-paperclip" %}
|
{% include "sidebar_item.html" with label="part-attachments" text=text icon="fa-paperclip" %}
|
||||||
{% trans "Notes" as text %}
|
{% trans "Notes" as text %}
|
||||||
{% include "sidebar_item.html" with label="part-notes" text=text icon="fa-clipboard" %}
|
{% include "sidebar_item.html" with label="part-notes" text=text icon="fa-clipboard" %}
|
||||||
|
|
||||||
{% include "panel/plugin_menu_items.html" %}
|
|
@@ -83,6 +83,7 @@
|
|||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
<!-- Sidebar goes here -->
|
<!-- Sidebar goes here -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% include "plugin/panel_menu.html" %}
|
||||||
{% include "sidebar_toggle.html" with target='sidebar' %}
|
{% include "sidebar_toggle.html" with target='sidebar' %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +211,7 @@
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
{% include "panel/plugin_javascript.html" %}
|
{% include "plugin/panel_js.html" %}
|
||||||
|
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -61,6 +61,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
|
<!-- Custom page content goes here-->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% include "plugin/panel_content.html" %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
|
{% if plugin_panels %}
|
||||||
|
<!-- Custom panel items, loaded via plugins -->
|
||||||
{% for panel in plugin_panels %}
|
{% for panel in plugin_panels %}
|
||||||
|
|
||||||
<div class='panel panel-hidden' id='panel-{{ panel.key }}'>
|
<div class='panel panel-hidden' id='panel-{{ panel.key }}'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<div class='d-flex flex-wrap'>
|
<div class='d-flex flex-wrap'>
|
||||||
@@ -14,5 +15,5 @@
|
|||||||
{{ panel.content | safe }}
|
{{ panel.content | safe }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endif %}
|
@@ -1,3 +1,6 @@
|
|||||||
|
{% if plugin_panels %}
|
||||||
|
<!-- Custom sidebar menu items, loaded via plugins -->
|
||||||
{% for panel in plugin_panels %}
|
{% for panel in plugin_panels %}
|
||||||
{% include "sidebar_item.html" with label=panel.key text=panel.title icon=panel.icon %}
|
{% include "sidebar_item.html" with label=panel.key text=panel.title icon=panel.icon %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
Reference in New Issue
Block a user