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:
@@ -23,32 +23,20 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Role</th>
|
||||
<td>
|
||||
{% if object.role %}
|
||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ object.role|linkify|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Platform</th>
|
||||
<td>
|
||||
{% if object.platform %}
|
||||
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ object.platform|linkify|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Tenant</th>
|
||||
<td>
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{{ object.tenant.group|linkify }} /
|
||||
{% endif %}
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{{ object.tenant|linkify }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@@ -103,9 +91,9 @@
|
||||
<th scope="row">Cluster</th>
|
||||
<td>
|
||||
{% if object.cluster.group %}
|
||||
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
||||
{{ object.cluster.group|linkify }} /
|
||||
{% endif %}
|
||||
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
||||
{{ object.cluster|linkify }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Reference in New Issue
Block a user