Allow to configure sidebar menu via the new settings system

This commit is contained in:
Jan Böhmer 2024-08-07 00:41:06 +02:00
parent 5e512f8935
commit 79da0518c2
15 changed files with 320 additions and 55 deletions

View file

@ -2,8 +2,8 @@
<div class="nav flex-column">
{% for item in sidebar_items %}
{{ tree.treeview_sidebar('sidebar-panel-' ~ loop.index, item) }}
{% for item in settings_instance('sidebar').items %}
{{ tree.treeview_sidebar('sidebar-panel-' ~ loop.index, item.value) }}
<div class="mb-2"></div>
{% endfor %}
</div>

View file

@ -6,7 +6,7 @@
['footprints', path('tree_footprint_root'), 'footprint.labelp', is_granted('@footprints.read') and is_granted('@parts.read')],
['manufacturers', path('tree_manufacturer_root'), 'manufacturer.labelp', is_granted('@manufacturers.read') and is_granted('@parts.read')],
['suppliers', path('tree_supplier_root'), 'supplier.labelp', is_granted('@suppliers.read') and is_granted('@parts.read')],
['devices', path('tree_device_root'), 'project.labelp', is_granted('@projects.read')],
['projects', path('tree_device_root'), 'project.labelp', is_granted('@projects.read')],
['tools', path('tree_tools'), 'tools.label', true],
] %}