mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
31 lines
1.6 KiB
HTML
31 lines
1.6 KiB
HTML
{% load helpers %}
|
|
<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 registry.plugin_menu_items.items %}
|
|
<li class="dropdown-header">{{ section_name }}</li>
|
|
{% for menu_item in menu_items %}
|
|
{% if not menu_item.permissions or request.user|has_perms:menu_item.permissions %}
|
|
<li>
|
|
{% if menu_item.buttons %}
|
|
<div class="buttons float-end">
|
|
{% for button in menu_item.buttons %}
|
|
{% if not button.permissions or request.user|has_perms:button.permissions %}
|
|
<a href="{% url button.link %}" class="btn btn-sm btn-{{ button.color }}" title="{{ button.title }}"><i class="{{ button.icon_class }}"></i></a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<a href="{% url menu_item.link %}">{{ menu_item.link_text }}</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="disabled"><a href="#">{{ menu_item.link_text }}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if not forloop.last %}
|
|
<li class="divider"></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|