diff --git a/netbox/templates/dcim/frontport.html b/netbox/templates/dcim/frontport.html index 08a3a8d2f..036a7d172 100644 --- a/netbox/templates/dcim/frontport.html +++ b/netbox/templates/dcim/frontport.html @@ -62,16 +62,27 @@
-

{% trans "Rear Ports" %}

- - {% for mapping in rear_port_mappings %} +

{% trans "Port Mappings" %}

+
+ {% if rear_port_mappings %} + - - - + + - {% endfor %} -
{{ mapping.front_port_position }}{{ mapping.rear_port|linkify }}{{ mapping.rear_port_position }}{% trans "Position" %}{% trans "Rear Port" %}
+ + {% endif %} + {% for mapping in rear_port_mappings %} + + {{ mapping.front_port_position }} + + {{ mapping.rear_port }}:{{ mapping.rear_port_position }} + + + {% empty %} + {% trans "No mappings defined" %} + {% endfor %} +

{% trans "Connection" %}

diff --git a/netbox/templates/dcim/rearport.html b/netbox/templates/dcim/rearport.html index 98cb70851..872a437dc 100644 --- a/netbox/templates/dcim/rearport.html +++ b/netbox/templates/dcim/rearport.html @@ -62,16 +62,27 @@
-

{% trans "Rear Ports" %}

- - {% for mapping in front_port_mappings %} +

{% trans "Port Mappings" %}

+
+ {% if front_port_mappings %} + - - - + + - {% endfor %} -
{{ mapping.rear_port_position }}{{ mapping.front_port|linkify }}{{ mapping.front_port_position }}{% trans "Position" %}{% trans "Front Port" %}
+ + {% endif %} + {% for mapping in front_port_mappings %} + + {{ mapping.rear_port_position }} + + {{ mapping.front_port }}:{{ mapping.front_port_position }} + + + {% empty %} + {% trans "No mappings defined" %} + {% endfor %} +

{% trans "Connection" %}