mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-23 01:08:45 +02:00
fix device & device component templates
This commit is contained in:
@@ -121,131 +121,77 @@
|
||||
</a>
|
||||
</li>
|
||||
{% with interface_count=object.vc_interfaces.count %}
|
||||
{% if interface_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_interfaces' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'interfaces' %} active{% endif %}"
|
||||
>
|
||||
Interfaces {% badge interface_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if interface_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'interfaces' %} active{% endif %}" href="{% url 'dcim:device_interfaces' pk=object.pk %}">Interfaces {% badge interface_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with frontport_count=object.frontports.count %}
|
||||
{% if frontport_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_frontports' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'front-ports' %} active{% endif %}"
|
||||
>
|
||||
Front Ports {% badge frontport_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if frontport_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'front-ports' %} active{% endif %}" href="{% url 'dcim:device_frontports' pk=object.pk %}">Front Ports {% badge frontport_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with rearport_count=object.rearports.count %}
|
||||
{% if rearport_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_rearports' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'rear-ports' %} active{% endif %}"
|
||||
>
|
||||
Rear Ports {% badge rearport_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if rearport_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'rear-ports' %} active{% endif %}" href="{% url 'dcim:device_rearports' pk=object.pk %}">Rear Ports {% badge rearport_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with consoleport_count=object.consoleports.count %}
|
||||
{% if consoleport_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_consoleports' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'console-ports' %} active{% endif %}"
|
||||
>
|
||||
Console Ports {% badge consoleport_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if consoleport_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'console-ports' %} active{% endif %}" href="{% url 'dcim:device_consoleports' pk=object.pk %}">Console Ports {% badge consoleport_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with consoleserverport_count=object.consoleserverports.count %}
|
||||
{% if consoleserverport_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_consoleserverports' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'console-server-ports' %} active{% endif %}"
|
||||
>
|
||||
Console Server Ports {% badge consoleserverport_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if consoleserverport_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'console-server-ports' %} active{% endif %}" href="{% url 'dcim:device_consoleserverports' pk=object.pk %}">Console Server Ports {% badge consoleserverport_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with powerport_count=object.powerports.count %}
|
||||
{% if powerport_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_powerports' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'power-ports' %} active{% endif %}"
|
||||
>
|
||||
Power Ports {% badge powerport_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if powerport_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'power-ports' %} active{% endif %}" href="{% url 'dcim:device_powerports' pk=object.pk %}">Power Ports {% badge powerport_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with poweroutlet_count=object.poweroutlets.count %}
|
||||
{% if poweroutlet_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_poweroutlets' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'power-outlets' %} active{% endif %}"
|
||||
>
|
||||
Power Outlets {% badge poweroutlet_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if poweroutlet_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'power-outlets' %} active{% endif %}" href="{% url 'dcim:device_poweroutlets' pk=object.pk %}">Power Outlets {% badge poweroutlet_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with devicebay_count=object.devicebays.count %}
|
||||
{% if devicebay_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_devicebays' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'device-bays' %} active{% endif %}"
|
||||
>
|
||||
Device Bays {% badge devicebay_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if devicebay_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'device-bays' %} active{% endif %}" href="{% url 'dcim:device_devicebays' pk=object.pk %}">Device Bays {% badge devicebay_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% with inventoryitem_count=object.inventoryitems.count %}
|
||||
{% if inventoryitem_count %}
|
||||
<li
|
||||
role="presentation"
|
||||
class="nav-item">
|
||||
<a
|
||||
href="{% url 'dcim:device_inventory' pk=object.pk %}"
|
||||
class="nav-link{% if active_tab == 'inventory' %} active{% endif %}"
|
||||
>
|
||||
Inventory {% badge inventoryitem_count %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if inventoryitem_count %}
|
||||
<li role="presentation" class="nav-item">
|
||||
<a class="nav-link {% if active_tab == 'inventory' %} active{% endif %}" href="{% url 'dcim:device_inventory' pk=object.pk %}">Inventory {% badge inventoryitem_count %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% if perms.dcim.napalm_read_device %}
|
||||
{% if object.status != 'active' %}
|
||||
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_consoleport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleport_bulk_rename' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleport_bulk_rename' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:consoleport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -38,7 +38,7 @@
|
||||
{% if perms.dcim.add_consoleport %}
|
||||
<div class="float-end">
|
||||
<a href="{% url 'dcim:consoleport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add console port
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add Console Port
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_consoleserverport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleserverport_bulk_rename' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleserverport_bulk_rename' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:consoleserverport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -36,9 +36,9 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_consoleserverport %}
|
||||
<div class="pull-right">
|
||||
<div class="float-end">
|
||||
<a href="{% url 'dcim:consoleserverport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add console server ports
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add Console Server Ports
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_devicebay %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:devicebay_bulk_rename' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:devicebay_bulk_rename' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:devicebay_bulk_edit' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-sm">
|
||||
@@ -28,14 +28,14 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_devicebay %}
|
||||
<button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-danger btn-sm">
|
||||
<button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-outline-danger btn-sm">
|
||||
<i class="bi bi-trash-fill" aria-hidden="true"></i> Delete selected
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_devicebay %}
|
||||
<div class="pull-right">
|
||||
<div class="float-end">
|
||||
<a href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add device bays
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add Device Bays
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_frontport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:frontport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -36,7 +36,7 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_frontport %}
|
||||
<div class="pull-right">
|
||||
<div class="float-end">
|
||||
<a href="{% url 'dcim:frontport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add front ports
|
||||
</a>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<h5>Interfaces</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceInterfaceTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-target="#DeviceInterfaceTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="float-end col-md-2 noprint">
|
||||
@@ -23,13 +23,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_interface %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:interface_bulk_rename' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:interface_bulk_rename' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:interface_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -39,9 +39,9 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_interface %}
|
||||
<div class="pull-right">
|
||||
<div class="float-end">
|
||||
<a href="{% url 'dcim:interface_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add interfaces
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add Interfaces
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_powerport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:poweroutlet_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_powerport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:powerport_bulk_rename' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:powerport_bulk_rename' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:powerport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:powerport_bulk_disconnect' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:powerport_bulk_disconnect' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
{% if perms.dcim.change_rearport %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:rearport_bulk_rename' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<button type="submit" name="_rename" formaction="{% url 'dcim:rearport_bulk_rename' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
||||
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:rearport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
||||
</button>
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:rearport_bulk_disconnect' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:rearport_bulk_disconnect' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user