mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Merge pull request #19194 from netbox-community/17908-cable-trace-buttons
Closes #17908: Add trace buttons to terminations under cable view
This commit is contained in:
commit
96cf8d14dc
@ -20,10 +20,15 @@
|
|||||||
<th scope="row">{{ terminations.0|meta:"verbose_name"|capfirst }}</th>
|
<th scope="row">{{ terminations.0|meta:"verbose_name"|capfirst }}</th>
|
||||||
<td>
|
<td>
|
||||||
{% for term in terminations %}
|
{% for term in terminations %}
|
||||||
{{term.device|linkify}}
|
{{ term.device|linkify }}
|
||||||
<i class="mdi mdi-chevron-right" aria-hidden="true"></i>
|
<i class="mdi mdi-chevron-right" aria-hidden="true"></i>
|
||||||
{{ term|linkify }}
|
{{ term|linkify }}
|
||||||
{% if not forloop.last %}<br/>{% endif %}
|
{% with trace_url=term|viewname:"trace" %}
|
||||||
|
<a href="{% url trace_url pk=term.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
||||||
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
{% endwith %}
|
||||||
|
{% if not forloop.last %}<br/>{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -41,7 +46,13 @@
|
|||||||
<th scope="row">{{ terminations.0|meta:"verbose_name"|capfirst }}</th>
|
<th scope="row">{{ terminations.0|meta:"verbose_name"|capfirst }}</th>
|
||||||
<td>
|
<td>
|
||||||
{% for term in terminations %}
|
{% for term in terminations %}
|
||||||
{{ term|linkify }}{% if not forloop.last %},{% endif %}
|
{{ term|linkify }}
|
||||||
|
{% with trace_url=term|viewname:"trace" %}
|
||||||
|
<a href="{% url trace_url pk=term.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
||||||
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
{% endwith %}
|
||||||
|
{% if not forloop.last %}<br/>{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -55,7 +66,13 @@
|
|||||||
<th scope="row">{% trans "Circuit" %}</th>
|
<th scope="row">{% trans "Circuit" %}</th>
|
||||||
<td>
|
<td>
|
||||||
{% for term in terminations %}
|
{% for term in terminations %}
|
||||||
{{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %}
|
{{ term.circuit|linkify }} ({{ term }})
|
||||||
|
{% with trace_url=term|viewname:"trace" %}
|
||||||
|
<a href="{% url trace_url pk=term.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
||||||
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
{% endwith %}
|
||||||
|
{% if not forloop.last %}<br/>{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user