From d3768feb31a84da72192a72b3f7595621e4d172e Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 15 Apr 2025 11:41:00 -0400 Subject: [PATCH] Closes #17908: Add trace buttons to terminations under cable view --- .../templates/dcim/inc/cable_termination.html | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/netbox/templates/dcim/inc/cable_termination.html b/netbox/templates/dcim/inc/cable_termination.html index 99b4353b2..1284bc420 100644 --- a/netbox/templates/dcim/inc/cable_termination.html +++ b/netbox/templates/dcim/inc/cable_termination.html @@ -20,10 +20,15 @@ {{ terminations.0|meta:"verbose_name"|capfirst }} {% for term in terminations %} - {{term.device|linkify}} - - {{ term|linkify }} - {% if not forloop.last %}
{% endif %} + {{ term.device|linkify }} + + {{ term|linkify }} + {% with trace_url=term|viewname:"trace" %} + + + + {% endwith %} + {% if not forloop.last %}
{% endif %} {% endfor %} @@ -41,7 +46,13 @@ {{ terminations.0|meta:"verbose_name"|capfirst }} {% for term in terminations %} - {{ term|linkify }}{% if not forloop.last %},{% endif %} + {{ term|linkify }} + {% with trace_url=term|viewname:"trace" %} + + + + {% endwith %} + {% if not forloop.last %}
{% endif %} {% endfor %} @@ -55,7 +66,13 @@ {% trans "Circuit" %} {% for term in terminations %} - {{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %} + {{ term.circuit|linkify }} ({{ term }}) + {% with trace_url=term|viewname:"trace" %} + + + + {% endwith %} + {% if not forloop.last %}
{% endif %} {% endfor %}