From 955abcef218d13f72f83fba49a1045896bc80312 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 14 Nov 2016 11:29:03 -0500 Subject: [PATCH] Fixes #691: Allow the assignment of power ports to PDUs --- netbox/templates/dcim/device.html | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 62683930b..14d5b0869 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -237,16 +237,14 @@ {% for pp in power_ports %} {% include 'dcim/inc/_powerport.html' %} {% empty %} - {% if not device.device_type.is_pdu %} - - - No power ports defined - {% if perms.dcim.add_powerport %} - - {% endif %} - - - {% endif %} + + + No power ports defined + {% if perms.dcim.add_powerport %} + + {% endif %} + + {% endfor %} {% if perms.dcim.add_interface or perms.dcim.add_consoleport or perms.dcim.add_powerport %} @@ -261,7 +259,7 @@ Add console port {% endif %} - {% if perms.dcim.add_powerport and not device.device_type.is_pdu %} + {% if perms.dcim.add_powerport %} Add power port