2021-03-02 15:58:33 -05:00
|
|
|
{% extends 'generic/object.html' %}
|
2020-11-13 15:00:12 -05:00
|
|
|
{% load buttons %}
|
|
|
|
{% load static %}
|
|
|
|
{% load helpers %}
|
|
|
|
{% load plugins %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2020-11-13 15:00:12 -05:00
|
|
|
|
2021-03-02 15:58:33 -05:00
|
|
|
{% block breadcrumbs %}
|
2021-07-20 12:14:01 -04:00
|
|
|
{{ block.super }}
|
2021-04-14 11:30:15 -07:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:device_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
|
2021-03-02 15:58:33 -05:00
|
|
|
{% if object.parent_bay %}
|
2021-03-13 02:19:42 -07:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:device' pk=object.parent_bay.device.pk %}">{{ object.parent_bay.device }}</a></li>
|
|
|
|
<li class="breadcrumb-item">{{ object.parent_bay }}</li>
|
2021-03-02 15:58:33 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2020-11-13 15:00:12 -05:00
|
|
|
|
2021-03-13 11:16:29 -07:00
|
|
|
{% block extra_controls %}
|
2021-08-03 10:03:22 -07:00
|
|
|
{% if perms.dcim.change_device %}
|
|
|
|
<div class="dropdown">
|
2024-01-17 16:25:42 -05:00
|
|
|
<button id="add-components" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Components" %}
|
2021-08-03 10:03:22 -07:00
|
|
|
</button>
|
2022-03-23 13:50:03 -04:00
|
|
|
<ul class="dropdown-menu" aria-labeled-by="add-components">
|
2021-08-03 10:03:22 -07:00
|
|
|
{% if perms.dcim.add_consoleport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:consoleport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.pk %}">{% trans "Console Ports" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_consoleserverport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:consoleserverport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}">{% trans "Console Server Ports" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_powerport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:powerport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_powerports' pk=object.pk %}">{% trans "Power Ports" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_poweroutlet %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:poweroutlet_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}">{% trans "Power Outlets" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_interface %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:interface_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}">{% trans "Interfaces" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_frontport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:frontport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}">{% trans "Front Ports" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_rearport %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:rearport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_rearports' pk=object.pk %}">{% trans "Rear Ports" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
2024-03-14 17:15:35 +01:00
|
|
|
{% if perms.dcim.add_modulebay %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:modulebay_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_modulebays' pk=object.pk %}">{% trans "Module Bays" %}</a></li>
|
2021-12-17 09:35:57 -05:00
|
|
|
{% endif %}
|
2021-08-03 10:03:22 -07:00
|
|
|
{% if perms.dcim.add_devicebay %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_devicebays' pk=object.pk %}">{% trans "Device Bays" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_inventoryitem %}
|
2023-07-29 03:30:25 +07:00
|
|
|
<li><a class="dropdown-item" href="{% url 'dcim:inventoryitem_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_inventory' pk=object.pk %}">{% trans "Inventory Items" %}</a></li>
|
2021-08-03 10:03:22 -07:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2021-03-13 11:16:29 -07:00
|
|
|
{% endif %}
|
2021-03-02 15:58:33 -05:00
|
|
|
{% endblock %}
|