Fixes #5174: Ensure consistent alignment of rack elevations

This commit is contained in:
Jeremy Stretch 2020-09-24 10:11:34 -04:00
parent 380f59ac0b
commit 856500b014
3 changed files with 16 additions and 12 deletions

View File

@ -4,6 +4,7 @@
### Bug Fixes ### 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 * [#5175](https://github.com/netbox-community/netbox/issues/5175) - Fix toggling of rack elevation order
--- ---

View File

@ -1,10 +0,0 @@
{% load helpers %}
<div class="rack_header">
<strong><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack.name }}</a></strong>
{% if rack.role %}
<br /><small class="label" style="color: {{ rack.role.color|fgcolor }}; background-color: #{{ rack.role.color }}">{{ rack.role }}</small>
{% endif %}
{% if rack.facility_id %}
<br /><small class="text-muted">{{ rack.facility_id }}</small>
{% endif %}
</div>

View File

@ -23,10 +23,23 @@
<div style="white-space: nowrap; overflow-x: scroll;"> <div style="white-space: nowrap; overflow-x: scroll;">
{% for rack in page %} {% for rack in page %}
<div style="display: inline-block; width: 266px"> <div style="display: inline-block; width: 266px">
{% include 'dcim/inc/rack_elevation_header.html' %} <div class="text-center">
<strong><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack.name }}</a></strong>
{% if rack.role %}
<br /><small class="label" style="color: {{ rack.role.color|fgcolor }}; background-color: #{{ rack.role.color }}">{{ rack.role }}</small>
{% endif %}
{% if rack.facility_id %}
<br /><small class="text-muted">{{ rack.facility_id }}</small>
{% endif %}
</div>
{% include 'dcim/inc/rack_elevation.html' with face=rack_face %} {% include 'dcim/inc/rack_elevation.html' with face=rack_face %}
<div class="clearfix"></div> <div class="clearfix"></div>
{% include 'dcim/inc/rack_elevation_header.html' %} <div class="text-center">
<strong><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack.name }}</a></strong>
{% if rack.facility_id %}
<small class="text-muted">({{ rack.facility_id }})</small>
{% endif %}
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>