1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Extend linkify() to accept an attr name for the link text

This commit is contained in:
jeremystretch
2022-03-22 15:17:34 -04:00
parent 75dae5fbe8
commit 8d682041a4
14 changed files with 33 additions and 52 deletions

View File

@@ -43,7 +43,7 @@
<div class="float-end">
<span class="text-muted">{{ context.weight }}</span>
</div>
<a href="{{ context.get_absolute_url }}"><strong>{{ context.name }}</strong></a>
<strong>{{ context|linkify:"name" }}"></strong>
{% if context.description %}
<br /><small>{{ context.description }}</small>
{% endif %}

View File

@@ -61,7 +61,7 @@
<th scope="row">Object</th>
<td>
{% if object.changed_object and object.changed_object.get_absolute_url %}
<a href="{{ object.changed_object.get_absolute_url }}">{{ object.changed_object }}</a>
{{ object.changed_object|linkify }}
{% else %}
{{ object.object_repr }}
{% endif %}