Skip to content

Commit

Permalink
Removed additional instances of manually-coded linkify
Browse files Browse the repository at this point in the history
  • Loading branch information
peteeckel committed Jun 10, 2024
1 parent 9b2708c commit b5e69e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
8 changes: 4 additions & 4 deletions netbox_dns/templates/netbox_dns/record.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,25 @@ <h5 class="card-header">Record</h5>
{% if object.ptr_record %}
<tr>
<th scope="row">PTR Record</th>
<td><a href="{% url 'plugins:netbox_dns:record' pk=object.ptr_record.pk %}">{{ object.ptr_record }}</td>
<td>{{ object.ptr_record|linkify }}</td>
</tr>
{% endif %}
{% if object.address_record %}
<tr>
<th scope="row">Address Record</th>
<td><a href="{% url 'plugins:netbox_dns:record' pk=object.address_record.pk %}">{{ object.address_record }}</td>
<td>{{ object.address_record|linkify }}</td>
</tr>
{% if object.address_record.ipam_ip_address %}
<tr>
<th scope="row">IPAM IP Address</th>
<td><a href="{% url 'ipam:ipaddress' pk=object.address_record.ipam_ip_address.pk %}">{{ object.address_record.ipam_ip_address }}</td>
<td>{{ object.address_record.ipam_ip_address|linkify }}</td>
</tr>
{% endif %}
{% endif %}
{% if object.ipam_ip_address %}
<tr>
<th scope="row">IPAM IP Address</th>
<td><a href="{% url 'ipam:ipaddress' pk=object.ipam_ip_address.pk %}">{{ object.ipam_ip_address }}</td>
<td>{{ object.ipam_ip_address|linkify }}</td>
</tr>
{% endif %}
<tr>
Expand Down
12 changes: 3 additions & 9 deletions netbox_dns/templates/netbox_dns/zone.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ <h5 class="card-header">
<td>
<table>
{% for nameserver in object.nameservers.all %}
<tr>
<td>
<a href="{% url 'plugins:netbox_dns:nameserver' pk=nameserver.pk %}">
{{ nameserver }}
</a>
</td>
</tr>
<tr><td>{{ nameserver|linkify }}</td></tr>
{% endfor %}
</table>
</td>
Expand Down Expand Up @@ -117,7 +111,7 @@ <h5 class="card-header">Zone SOA</h5>
</tr>
<tr>
<th scope="row">MName</th>
<td><a href="{% url 'plugins:netbox_dns:nameserver' pk=object.soa_mname.pk %}">{{ object.soa_mname }}</a></td>
<td>{{ object.soa_mname|linkify }}</td>
</tr>
<tr>
<th scope="row">RName</th>
Expand Down Expand Up @@ -167,7 +161,7 @@ <h5 class="card-header">RFC2317</h5>
{% if object.rfc2317_parent_managed %}
<tr>
<th scope="row">Parent Zone</th>
<td><a href="{% url 'plugins:netbox_dns:zone' pk=object.rfc2317_parent_zone.pk %}">{{ object.rfc2317_parent_zone }}</a></td>
<td>{{ object.rfc2317_parent_zone|linkify }}</td>
</tr>
{% endif %}
</table>
Expand Down

0 comments on commit b5e69e5

Please sign in to comment.