Introduce linkify template filter

This commit is contained in:
jeremystretch
2022-03-22 14:51:20 -04:00
parent dc92e19f76
commit 75dae5fbe8
68 changed files with 240 additions and 637 deletions

View File

@@ -20,19 +20,11 @@
<table class="table table-hover attr-table">
<tr>
<th scope="row">Device</th>
<td>
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
</td>
<td>{{ object.device|linkify }}</td>
</tr>
<tr>
<th scope="row">Module</th>
<td>
{% if object.module %}
<a href="{{ object.module.get_absolute_url }}">{{ object.module }}</a>
{% else %}
{{ None|placeholder }}
{% endif %}
</td>
<td>{{ object.module|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Name</th>
@@ -82,7 +74,7 @@
<tr>
<th scope="row">Cable</th>
<td>
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
{{ object.cable|linkify }}
<a href="{% url 'dcim:rearport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
</a>