From 856500b014f53a04d896888b193536a17c7f3cbc Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 24 Sep 2020 10:11:34 -0400 Subject: [PATCH] Fixes #5174: Ensure consistent alignment of rack elevations --- docs/release-notes/version-2.9.md | 1 + .../dcim/inc/rack_elevation_header.html | 10 ---------- netbox/templates/dcim/rack_elevation_list.html | 17 +++++++++++++++-- 3 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 netbox/templates/dcim/inc/rack_elevation_header.html diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md index 77dabfab9..d9046cfae 100644 --- a/docs/release-notes/version-2.9.md +++ b/docs/release-notes/version-2.9.md @@ -4,6 +4,7 @@ ### Bug Fixes +* [#5174](https://github.com/netbox-community/netbox/issues/5174) - Ensure consistent alignment of rack elevations * [#5175](https://github.com/netbox-community/netbox/issues/5175) - Fix toggling of rack elevation order --- diff --git a/netbox/templates/dcim/inc/rack_elevation_header.html b/netbox/templates/dcim/inc/rack_elevation_header.html deleted file mode 100644 index 36ac11398..000000000 --- a/netbox/templates/dcim/inc/rack_elevation_header.html +++ /dev/null @@ -1,10 +0,0 @@ -{% load helpers %} -
- {{ rack.name }} - {% if rack.role %} -
{{ rack.role }} - {% endif %} - {% if rack.facility_id %} -
{{ rack.facility_id }} - {% endif %} -
diff --git a/netbox/templates/dcim/rack_elevation_list.html b/netbox/templates/dcim/rack_elevation_list.html index 955bfa066..433053abc 100644 --- a/netbox/templates/dcim/rack_elevation_list.html +++ b/netbox/templates/dcim/rack_elevation_list.html @@ -23,10 +23,23 @@
{% for rack in page %}
- {% include 'dcim/inc/rack_elevation_header.html' %} +
+ {{ rack.name }} + {% if rack.role %} +
{{ rack.role }} + {% endif %} + {% if rack.facility_id %} +
{{ rack.facility_id }} + {% endif %} +
{% include 'dcim/inc/rack_elevation.html' with face=rack_face %}
- {% include 'dcim/inc/rack_elevation_header.html' %} +
+ {{ rack.name }} + {% if rack.facility_id %} + ({{ rack.facility_id }}) + {% endif %} +
{% endfor %}