diff --git a/netbox/dcim/tables/template_code.py b/netbox/dcim/tables/template_code.py
index 5b76b88da..c8da868b9 100644
--- a/netbox/dcim/tables/template_code.py
+++ b/netbox/dcim/tables/template_code.py
@@ -65,7 +65,7 @@ MPTT_LINK = """
POWERFEED_CABLE = """
{{ value }}
-
+
"""
@@ -77,7 +77,7 @@ POWERFEED_CABLETERMINATION = """
"""
RACKGROUP_ELEVATIONS = """
-
+
"""
@@ -93,24 +93,24 @@ UTILIZATION_GRAPH = """
CONSOLEPORT_BUTTONS = """
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif perms.dcim.add_cable %}
-
-
+
+
-
{% endif %}
@@ -118,24 +118,24 @@ CONSOLEPORT_BUTTONS = """
CONSOLESERVERPORT_BUTTONS = """
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif perms.dcim.add_cable %}
-
-
+
+
-
+
-
{% endif %}
@@ -143,23 +143,23 @@ CONSOLESERVERPORT_BUTTONS = """
POWERPORT_BUTTONS = """
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif perms.dcim.add_cable %}
-
-
+
+
-
+
-
{% endif %}
@@ -167,17 +167,17 @@ POWERPORT_BUTTONS = """
POWEROUTLET_BUTTONS = """
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif perms.dcim.add_cable %}
-
-
-
+
+
+
{% endif %}
@@ -185,30 +185,30 @@ POWEROUTLET_BUTTONS = """
INTERFACE_BUTTONS = """
{% if perms.ipam.add_ipaddress %}
-
+
{% endif %}
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif record.is_connectable and perms.dcim.add_cable %}
-
-
+
+
-
+
-
{% endif %}
@@ -216,27 +216,27 @@ INTERFACE_BUTTONS = """
FRONTPORT_BUTTONS = """
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif perms.dcim.add_cable %}
-
-
+
+
-
+
-
{% endif %}
@@ -244,25 +244,25 @@ FRONTPORT_BUTTONS = """
REARPORT_BUTTONS = """
{% if record.cable %}
-
+
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% if perms.dcim.delete_cable %}
-
+
{% endif %}
{% elif perms.dcim.add_cable %}
-
-
+
+
-
+
-
{% endif %}
@@ -271,11 +271,11 @@ REARPORT_BUTTONS = """
DEVICEBAY_BUTTONS = """
{% if perms.dcim.change_devicebay %}
{% if record.installed_device %}
-
+
{% else %}
-
+
{% endif %}
diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html
index a18d4dbe4..bd3675213 100644
--- a/netbox/templates/dcim/device.html
+++ b/netbox/templates/dcim/device.html
@@ -114,7 +114,7 @@
{% endfor %}
-