Clean up organizational object URLs

This commit is contained in:
Jeremy Stretch
2021-03-29 16:17:25 -04:00
parent 12945704e9
commit 3869028d53
16 changed files with 51 additions and 39 deletions

View File

@@ -7,10 +7,10 @@
{% block breadcrumbs %}
<li><a href="{% url 'ipam:vlan_list' %}">VLANs</a></li>
{% if object.site %}
<li><a href="{% url 'ipam:vlan_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
<li><a href="{% url 'ipam:vlan_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
{% endif %}
{% if object.group %}
<li><a href="{% url 'ipam:vlan_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li>
<li><a href="{% url 'ipam:vlan_list' %}?group_id={{ object.group.pk }}">{{ object.group }}</a></li>
{% endif %}
<li>{{ object }}</li>
{% endblock %}
@@ -96,7 +96,7 @@
<td>Role</td>
<td>
{% if object.role %}
<a href="{% url 'ipam:vlan_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}