Просмотр исходного кода

Fixes #5473: Fix alignment of rack names in elevations list

Jeremy Stretch 5 лет назад
Родитель
Сommit
4ce7dfa55e

+ 8 - 0
docs/release-notes/version-2.10.md

@@ -1,5 +1,13 @@
 # NetBox v2.10
 
+## v2.10.2 (FUTURE)
+
+### Bug Fixes
+
+* [#5473](https://github.com/netbox-community/netbox/issues/5473) - Fix alignment of rack names in elevations list
+
+---
+
 ## v2.10.1 (2020-12-15)
 
 ### Bug Fixes

+ 4 - 0
netbox/templates/dcim/rack.html

@@ -330,12 +330,16 @@
     <div class="col-md-6">
         <div class="row" style="margin-bottom: 20px">
             <div class="col-md-6 col-sm-6 col-xs-12 text-center">
+              <div style="margin-left: 30px">
                 <h4>Front</h4>
                 {% include 'dcim/inc/rack_elevation.html' with face='front' %}
+              </div>
             </div>
             <div class="col-md-6 col-sm-6 col-xs-12 text-center">
+              <div style="margin-left: 30px">
                 <h4>Rear</h4>
                 {% include 'dcim/inc/rack_elevation.html' with face='rear' %}
+              </div>
             </div>
         </div>
         <div class="panel panel-default">

+ 3 - 1
netbox/templates/dcim/rack_elevation_list.html

@@ -25,7 +25,8 @@
         {% if page %}
             <div style="white-space: nowrap; overflow-x: scroll;">
                 {% for rack in page %}
-                    <div style="display: inline-block; width: 266px">
+                    <div style="display: inline-block; margin-right: 12px; width: 254px">
+                      <div style="margin-left: 30px">
                         <div class="text-center">
                             <strong><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack.name }}</a></strong>
                             {% if rack.role %}
@@ -43,6 +44,7 @@
                                 <small class="text-muted">({{ rack.facility_id }})</small>
                             {% endif %}
                         </div>
+                      </div>
                     </div>
                 {% endfor %}
             </div>