From 33e825e91edd3ce29a60c5dff5a0e48162436937 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 21 Jul 2021 15:49:01 -0400 Subject: [PATCH] Fixes #6780: Include rack location in navigation breadcrumbs --- docs/release-notes/version-2.11.md | 1 + netbox/templates/dcim/rack.html | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 0afe81ffd..31607eb45 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -7,6 +7,7 @@ * [#5442](https://github.com/netbox-community/netbox/issues/5442) - Fix assignment of permissions based on LDAP groups * [#6773](https://github.com/netbox-community/netbox/issues/6773) - Add missing `display` field to rack unit serializer * [#6778](https://github.com/netbox-community/netbox/issues/6778) - Rack reservation should display rack's location +* [#6780](https://github.com/netbox-community/netbox/issues/6780) - Include rack location in navigation breadcrumbs --- diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html index ada93518f..94f0ea24c 100644 --- a/netbox/templates/dcim/rack.html +++ b/netbox/templates/dcim/rack.html @@ -9,11 +9,11 @@ {% block breadcrumbs %}
  • Racks
  • {{ object.site }}
  • - {% if object.group %} - {% for group in object.group.get_ancestors %} -
  • {{ group }}
  • + {% if object.location %} + {% for location in object.location.get_ancestors %} +
  • {{ location }}
  • {% endfor %} -
  • {{ object.group }}
  • +
  • {{ object.location }}
  • {% endif %}
  • {{ object }}
  • {% endblock %}