diff --git a/netbox/dcim/tables/template_code.py b/netbox/dcim/tables/template_code.py index 0869530ab..348ea68ca 100644 --- a/netbox/dcim/tables/template_code.py +++ b/netbox/dcim/tables/template_code.py @@ -110,18 +110,32 @@ CONSOLEPORT_BUTTONS = """ {% endif %} {% 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 %} {% elif perms.dcim.add_cable %} - + + {% endif %} {% elif perms.dcim.add_cable %} - + + {% endif %} {% elif perms.dcim.add_cable %} - {% if not record.mark_connected %} @@ -262,18 +318,33 @@ INTERFACE_BUTTONS = """ {% endif %} -{% if record.link %} - -{% endif %} {% if record.cable %} {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %} {% if perms.dcim.delete_cable %} - - - - - - + + + + {% endif %} {% elif record.wireless_link %} {% if perms.wireless.delete_wirelesslink %} @@ -282,7 +353,6 @@ INTERFACE_BUTTONS = """ {% endif %} {% elif record.is_wired and perms.dcim.add_cable %} - {% if not record.mark_connected %} @@ -313,18 +383,32 @@ FRONTPORT_BUTTONS = """ {% endif %} {% 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 %} - {% if not record.mark_connected %} @@ -353,18 +437,32 @@ REARPORT_BUTTONS = """ {% endif %} {% 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 %} - {% if not record.mark_connected %}