|
@@ -39,32 +39,41 @@
|
|
|
<a href="{% url 'dcim:rack_list' %}">Racks</a>
|
|
|
{% endif %}
|
|
|
</li>
|
|
|
- <li class="dropdown{% if '/devices/' in request.path %} active{% endif %}">
|
|
|
- {% if perms.dcim.add_device %}
|
|
|
+ <li class="dropdown{% if '/devices/' in request.path or '/device-types/' in request.path or '-connections/' in request.path %} active{% endif %}">
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Devices <span class="caret"></span></a>
|
|
|
<ul class="dropdown-menu">
|
|
|
<li><a href="{% url 'dcim:device_list' %}"><i class="glyphicon glyphicon-search" aria-hidden="true"></i> Devices</a></li>
|
|
|
- <li><a href="{% url 'dcim:device_add' %}"><i class="glyphicon glyphicon-plus" aria-hidden="true"></i> Add a Device</a></li>
|
|
|
- <li><a href="{% url 'dcim:device_import' %}"><i class="glyphicon glyphicon-import" aria-hidden="true"></i> Import Devices</a></li>
|
|
|
+ {% if perms.dcim.add_device %}
|
|
|
+ <li><a href="{% url 'dcim:device_add' %}"><i class="glyphicon glyphicon-plus" aria-hidden="true"></i> Add a Device</a></li>
|
|
|
+ <li><a href="{% url 'dcim:device_import' %}"><i class="glyphicon glyphicon-import" aria-hidden="true"></i> Import Devices</a></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if perms.ipam.add_device or perms.ipam.add_devicetype %}
|
|
|
+ <li class="divider"></li>
|
|
|
+ {% endif %}
|
|
|
+ <li><a href="{% url 'dcim:devicetype_list' %}"><i class="glyphicon glyphicon-search" aria-hidden="true"></i> Device Types</a></li>
|
|
|
+ {% if perms.dcim.add_device %}
|
|
|
+ <li><a href="{% url 'dcim:devicetype_add' %}"><i class="glyphicon glyphicon-plus" aria-hidden="true"></i> Add a Device Type</a></li>
|
|
|
+ {% endif %}
|
|
|
<li class="divider"></li>
|
|
|
<li><a href="{% url 'dcim:console_connections_list' %}"><i class="glyphicon glyphicon-search" aria-hidden="true"></i> Console Connections</a></li>
|
|
|
{% if perms.dcim.change_consoleport %}
|
|
|
<li><a href="{% url 'dcim:console_connections_import' %}"><i class="glyphicon glyphicon-import" aria-hidden="true"></i> Import Console Connections</a></li>
|
|
|
{% endif %}
|
|
|
- <li class="divider"></li>
|
|
|
+ {% if perms.ipam.change_consoleport or perms.ipam.change_powerport %}
|
|
|
+ <li class="divider"></li>
|
|
|
+ {% endif %}
|
|
|
<li><a href="{% url 'dcim:power_connections_list' %}"><i class="glyphicon glyphicon-search" aria-hidden="true"></i> Power Connections</a></li>
|
|
|
{% if perms.dcim.change_powerport %}
|
|
|
<li><a href="{% url 'dcim:power_connections_import' %}"><i class="glyphicon glyphicon-import" aria-hidden="true"></i> Import Power Connections</a></li>
|
|
|
{% endif %}
|
|
|
- <li class="divider"></li>
|
|
|
+ {% if perms.ipam.change_powerport or perms.ipam.add_interfaceconnection %}
|
|
|
+ <li class="divider"></li>
|
|
|
+ {% endif %}
|
|
|
<li><a href="{% url 'dcim:interface_connections_list' %}"><i class="glyphicon glyphicon-search" aria-hidden="true"></i> Interface Connections</a></li>
|
|
|
{% if perms.dcim.add_interfaceconnection %}
|
|
|
<li><a href="{% url 'dcim:interface_connections_import' %}"><i class="glyphicon glyphicon-import" aria-hidden="true"></i> Import Interface Connections</a></li>
|
|
|
{% endif %}
|
|
|
</ul>
|
|
|
- {% else %}
|
|
|
- <a href="{% url 'dcim:device_list' %}">Devices</a>
|
|
|
- {% endif %}
|
|
|
</li>
|
|
|
<li class="dropdown{% if '/ip-addresses/' in request.path or '/prefixes/' in request.path or '/aggregates/' in request.path %} active{% endif %}">
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">IP Space <span class="caret"></span></a>
|