mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 20:22:53 -06:00
30 lines
1.5 KiB
HTML
30 lines
1.5 KiB
HTML
<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 %}
|
|
<li class="dropdown-header">{{ section_name }}</li>
|
|
{% for menu_item in menu_items %}
|
|
{% if menu_item.permission %}
|
|
<li{% if not menu_item.permission in perms %} class="disabled"{% endif %}>
|
|
{% else %}
|
|
<li>
|
|
{% endif %}
|
|
{% if menu_item.buttons %}
|
|
<div class="buttons pull-right">
|
|
{% for button in menu_item.buttons %}
|
|
{% if not button.permission or button.permission in perms %}
|
|
<a href="{% url button.link %}" class="btn btn-xs btn-{{ button.color }}" title="{{ button.title }}"><i class="fa {{ button.icon_class }}"></i></a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<a href="{% url menu_item.link %}">{{ menu_item.link_text }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% if not forloop.last %}
|
|
<li class="divider"></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|