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

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

@@ -3,15 +3,11 @@
<table class="table table-hover panel-body attr-table">
<tr>
<td>Device</td>
<td>
<a href="{{ interface.device.get_absolute_url }}">{{ interface.device }}</a>
</td>
<td>{{ interface.device|linkify }}</td>
</tr>
<tr>
<td>Interface</td>
<td>
<a href="{{ interface.get_absolute_url }}">{{ interface }}</a>
</td>
<td>{{ interface|linkify }}</td>
</tr>
<tr>
<td>Type</td>

View File

@@ -16,13 +16,7 @@
</tr>
<tr>
<td>Group</td>
<td>
{% if object.group %}
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
<td>{{ object.group|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Description</th>
@@ -30,13 +24,7 @@
</tr>
<tr>
<th scope="row">VLAN</th>
<td>
{% if object.vlan %}
<a href="{{ object.vlan.get_absolute_url }}">{{ object.vlan }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
<td>{{ object.vlan|linkify|placeholder }}</td>
</tr>
</table>
</div>

View File

@@ -35,13 +35,7 @@
</tr>
<tr>
<th scope="row">Parent</th>
<td>
{% if object.parent %}
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
<td>{{ object.parent|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Wireless LANs</th>