mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-07 02:41:21 +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:
1 parent
71128a1c8e
commit
0797e9ebf0
7 files changed
+13
-10
No files matched your search
@@ -0,0 +1,19 @@
|
||||
{% if plugin_panels %}
|
||||
<!-- Custom panel items, loaded via plugins -->
|
||||
{% for panel in plugin_panels %}
|
||||
<div class='panel panel-hidden' id='panel-{{ panel.key }}'>
|
||||
<div class='panel-heading'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
<h4>{{ panel.title }}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
<!-- TODO: Implement custom action buttons for plugin panels -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
{{ panel.content | safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% if plugin_panels %}
|
||||
// Run custom javascript when plugin panels are loaded
|
||||
{% for panel in plugin_panels %}
|
||||
{% if panel.javascript %}
|
||||
onPanelLoad('{{ panel.key }}', function() {
|
||||
{{ panel.javascript | safe }}
|
||||
});
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% if plugin_panels %}
|
||||
<!-- Custom sidebar menu items, loaded via plugins -->
|
||||
{% for panel in plugin_panels %}
|
||||
{% include "sidebar_item.html" with label=panel.key text=panel.title icon=panel.icon %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user