mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Expose regsitry in templates using existing context processor for settings
This commit is contained in:
@@ -504,7 +504,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% if plugin_menu_items %}
|
||||
{% if registry.plugin_menu_items %}
|
||||
{% include 'inc/plugin_menu_items.html' %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Plugins <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for section_name, menu_items in plugin_menu_items.items %}
|
||||
{% for section_name, menu_items in registry.plugin_menu_items.items %}
|
||||
<li class="dropdown-header">{{ section_name }}</li>
|
||||
{% for menu_item in menu_items %}
|
||||
<li{% if menu_item.permissions and not request.user|has_perms:menu_item.permissions %} class="disabled"{% endif %}>
|
||||
|
Reference in New Issue
Block a user