Quellcode durchsuchen

netbox-community/netbox#7668: Relocate elevations button to location details table

Rhys Barrie vor 4 Jahren
Ursprung
Commit
d528614cbf
1 geänderte Dateien mit 10 neuen und 6 gelöschten Zeilen
  1. 10 6
      netbox/templates/dcim/location.html

+ 10 - 6
netbox/templates/dcim/location.html

@@ -9,12 +9,6 @@
   {% endfor %}
 {% endblock %}
 
-{% block extra_controls %}
-  <a href="{% url 'dcim:rack_elevation_list' %}?site_id={{ object.site.pk }}&location_id={{ object.pk }}" class="btn btn-sm btn-primary" role="button">
-    <i class="mdi mdi-server" aria-hidden="true"></i>&nbsp;View Elevations
-  </a>
-{% endblock %}
-
 {% block content %}
 <div class="row mb-3">
 	<div class="col col-md-6">
@@ -27,14 +21,17 @@
           <tr>
             <th scope="row">Name</th>
             <td>{{ object.name }}</td>
+            <td></td>
           </tr>
           <tr>
             <th scope="row">Description</th>
             <td>{{ object.description|placeholder }}</td>
+            <td></td>
           </tr>
           <tr>
             <th scope="row">Site</th>
             <td><a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a></td>
+            <td></td>
           </tr>
           <tr>
             <th scope="row">Parent</th>
@@ -45,18 +42,25 @@
                 <span class="text-muted">&mdash;</span>
               {% endif %}
             </td>
+            <td></td>
           </tr>
           <tr>
             <th scope="row">Racks</th>
             <td>
               <a href="{% url 'dcim:rack_list' %}?location_id={{ object.pk }}">{{ rack_count }}</a>
             </td>
+            <td class="noprint text-end">
+              <a href="{% url 'dcim:rack_elevation_list' %}?location_id={{ object.pk }}" class="btn btn-sm btn-primary" title="View Elevations">
+                <i class="mdi mdi-server"></i>
+              </a>
+            </td>
           </tr>
           <tr>
             <th scope="row">Devices</th>
             <td>
               <a href="{% url 'dcim:device_list' %}?location_id={{ object.pk }}">{{ device_count }}</a>
             </td>
+            <td></td>
           </tr>
         </table>
       </div>