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

Fixes #6780: Include rack location in navigation breadcrumbs

This commit is contained in:
jeremystretch
2021-07-21 15:49:01 -04:00
parent c5e74635dd
commit 33e825e91e
2 changed files with 5 additions and 4 deletions

View File

@@ -9,11 +9,11 @@
{% block breadcrumbs %}
<li><a href="{% url 'dcim:rack_list' %}">Racks</a></li>
<li><a href="{% url 'dcim:rack_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
{% if object.group %}
{% for group in object.group.get_ancestors %}
<li><a href="{{ group.get_absolute_url }}">{{ group }}</a></li>
{% if object.location %}
{% for location in object.location.get_ancestors %}
<li><a href="{{ location.get_absolute_url }}">{{ location }}</a></li>
{% endfor %}
<li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li>
<li><a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a></li>
{% endif %}
<li>{{ object }}</li>
{% endblock %}