diff --git a/netbox/templates/dcim/inc/cable_termination.html b/netbox/templates/dcim/inc/cable_termination.html index 9d1c43bdd..ced9bda50 100644 --- a/netbox/templates/dcim/inc/cable_termination.html +++ b/netbox/templates/dcim/inc/cable_termination.html @@ -1,58 +1,62 @@ {% load helpers %} - - {% if terminations.0.device %} - {# Device component #} - - - - - - - - - - - - - - - - - {% elif terminations.0.power_panel %} - {# Power feed #} - - - - - - - - - - - - - {% else %} - {# Circuit termination #} - - - - - - - - - {% endif %} -
Site{{ terminations.0.device.site|linkify }}
Rack{{ terminations.0.device.rack|linkify|placeholder }}
Device{{ terminations.0.device|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} - {% for term in terminations %} - {{ term|linkify }}{% if not forloop.last %},{% endif %} - {% endfor %} -
Site{{ terminations.0.power_panel.site|linkify }}
Power Panel{{ terminations.0.power_panel|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} - {% for term in terminations %} - {{ term|linkify }}{% if not forloop.last %},{% endif %} - {% endfor %} -
Provider{{ terminations.0.circuit.provider|linkify }}
Circuit - {% for term in terminations %} - {{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %} - {% endfor %} -
+{% if terminations.0 %} + + {% if terminations.0.device %} + {# Device component #} + + + + + + + + + + + + + + + + + {% elif terminations.0.power_panel %} + {# Power feed #} + + + + + + + + + + + + + {% elif terminations.0.circuit %} + {# Circuit termination #} + + + + + + + + + {% endif %} +
Site{{ terminations.0.device.site|linkify }}
Rack{{ terminations.0.device.rack|linkify|placeholder }}
Device{{ terminations.0.device|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} + {% for term in terminations %} + {{ term|linkify }}{% if not forloop.last %},{% endif %} + {% endfor %} +
Site{{ terminations.0.power_panel.site|linkify }}
Power Panel{{ terminations.0.power_panel|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} + {% for term in terminations %} + {{ term|linkify }}{% if not forloop.last %},{% endif %} + {% endfor %} +
Provider{{ terminations.0.circuit.provider|linkify }}
Circuit + {% for term in terminations %} + {{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %} + {% endfor %} +
+{% else %} + No termination +{% endif %}