Sfoglia il codice sorgente

Remove obsolete responsive_table.html template

jeremystretch 4 anni fa
parent
commit
25f501fb12

+ 6 - 4
netbox/templates/dcim/inc/devicetype_component_table.html

@@ -1,4 +1,6 @@
 {% load helpers %}
 {% load helpers %}
+{% load render_table from django_tables2 %}
+
 {% if perms.dcim.change_devicetype %}
 {% if perms.dcim.change_devicetype %}
     <form method="post">
     <form method="post">
         {% csrf_token %}
         {% csrf_token %}
@@ -6,8 +8,8 @@
             <h5 class="card-header">
             <h5 class="card-header">
                 {{ title }}
                 {{ title }}
             </h5>
             </h5>
-            <div class="card-body">
-                {% include 'inc/responsive_table.html' %}
+            <div class="card-body table-responsive">
+                {% render_table table 'inc/table.html' %}
             </div>
             </div>
             <div class="card-footer noprint">
             <div class="card-footer noprint">
                 {% if table.rows %}
                 {% if table.rows %}
@@ -36,8 +38,8 @@
         <h5 class="card-header">
         <h5 class="card-header">
             {{ title }}
             {{ title }}
         </h5>
         </h5>
-        <div class="card-body">
-            {% include 'inc/responsive_table.html' %}
+        <div class="card-body table-responsive">
+            {% render_table table 'inc/table.html' %}
         </div>
         </div>
     </div>
     </div>
 {% endif %}
 {% endif %}

+ 2 - 2
netbox/templates/home.html

@@ -71,8 +71,8 @@
               <i class="mdi mdi-clipboard-clock"></i>
               <i class="mdi mdi-clipboard-clock"></i>
               <span class="ms-1">Change Log</span>
               <span class="ms-1">Change Log</span>
             </h6>
             </h6>
-            <div class="card-body">
-              {% include 'inc/responsive_table.html' with table=changelog_table %}
+            <div class="card-body table-responsive">
+              {% render_table changelog_table 'inc/table.html' %}
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>

+ 4 - 1
netbox/templates/import_success.html

@@ -1,9 +1,12 @@
 {% extends 'base/layout.html' %}
 {% extends 'base/layout.html' %}
+{% load render_table from django_tables2 %}
 
 
 {% block title %}Import Completed{% endblock %}
 {% block title %}Import Completed{% endblock %}
 
 
 {% block content %}
 {% block content %}
-    {% include 'inc/responsive_table.html' %}
+    <div class="table-responsive">
+        {% render_table table 'inc/table.html' %}
+    </div>
     {% if return_url %}
     {% if return_url %}
         <a href="{{ return_url }}" class="btn btn-outline-dark">View All</a>
         <a href="{{ return_url }}" class="btn btn-outline-dark">View All</a>
     {% endif %}
     {% endif %}

+ 0 - 5
netbox/templates/inc/responsive_table.html

@@ -1,5 +0,0 @@
-{% load render_table from django_tables2 %}
-
-<div class="table-responsive">
-    {% render_table table 'inc/table.html' %}
-</div>

+ 1 - 1
netbox/templates/ipam/aggregate.html

@@ -77,6 +77,6 @@
 <div class="row mb-3">
 <div class="row mb-3">
     <div class="col col-md-12">
     <div class="col col-md-12">
         {% include 'utilities/obj_table.html' with table=prefix_table heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
         {% include 'utilities/obj_table.html' with table=prefix_table heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
-	</div>
+	  </div>
 </div>
 </div>
 {% endblock %}
 {% endblock %}

+ 3 - 2
netbox/templates/ipam/vlan.html

@@ -1,5 +1,6 @@
 {% extends 'ipam/vlan/base.html' %}
 {% extends 'ipam/vlan/base.html' %}
 {% load helpers %}
 {% load helpers %}
+{% load render_table from django_tables2 %}
 {% load plugins %}
 {% load plugins %}
 
 
 {% block content %}
 {% block content %}
@@ -92,8 +93,8 @@
                 <h5 class="card-header">
                 <h5 class="card-header">
                     Prefixes
                     Prefixes
                 </h5>
                 </h5>
-                <div class="card-body">
-                    {% include 'inc/responsive_table.html' with table=prefix_table %}
+                <div class="card-body table-responsive">
+                    {% render_table prefix_table 'inc/table.html' %}
                 </div>
                 </div>
                 {% if perms.ipam.add_prefix %}
                 {% if perms.ipam.add_prefix %}
                 <div class="card-footer text-end noprint">
                 <div class="card-footer text-end noprint">

+ 7 - 2
netbox/templates/utilities/obj_table.html

@@ -1,4 +1,5 @@
 {% load helpers %}
 {% load helpers %}
+{% load render_table from django_tables2 %}
 
 
 {% if permissions.change or permissions.delete %}
 {% if permissions.change or permissions.delete %}
     <form method="post" class="form form-horizontal">
     <form method="post" class="form form-horizontal">
@@ -28,7 +29,9 @@
             </div>
             </div>
         {% endif %}
         {% endif %}
 
 
-        {% include table_template|default:'inc/responsive_table.html' %}
+        <div class="table-responsive">
+          {% render_table table 'inc/table.html' %}
+        </div>
 
 
         <div class="float-start noprint">
         <div class="float-start noprint">
             {% block extra_actions %}{% endblock %}
             {% block extra_actions %}{% endblock %}
@@ -48,7 +51,9 @@
     </form>
     </form>
 {% else %}
 {% else %}
 
 
-    {% include table_template|default:'inc/responsive_table.html' %}
+    <div class="table-responsive">
+      {% render_table table 'inc/table.html' %}
+    </div>
 
 
 {% endif %}
 {% endif %}
 
 

+ 3 - 2
netbox/templates/virtualization/cluster/devices.html

@@ -1,5 +1,6 @@
 {% extends 'virtualization/cluster/base.html' %}
 {% extends 'virtualization/cluster/base.html' %}
 {% load helpers %}
 {% load helpers %}
+{% load render_table from django_tables2 %}
 
 
 {% block content %}
 {% block content %}
 <div class="row">
 <div class="row">
@@ -10,8 +11,8 @@
       </h5>
       </h5>
       <form action="{% url 'virtualization:cluster_remove_devices' pk=object.pk %}" method="post">
       <form action="{% url 'virtualization:cluster_remove_devices' pk=object.pk %}" method="post">
       {% csrf_token %}
       {% csrf_token %}
-      <div class="card-body">
-        {% include 'inc/responsive_table.html' with table=devices_table %}
+      <div class="card-body table-responsive">
+        {% render_table devices_table 'inc/table.html' %}
       </div>
       </div>
       {% if perms.virtualization.change_cluster %}
       {% if perms.virtualization.change_cluster %}
         <div class="card-footer noprint">
         <div class="card-footer noprint">

+ 3 - 2
netbox/templates/virtualization/cluster/virtual_machines.html

@@ -1,5 +1,6 @@
 {% extends 'virtualization/cluster/base.html' %}
 {% extends 'virtualization/cluster/base.html' %}
 {% load helpers %}
 {% load helpers %}
+{% load render_table from django_tables2 %}
 
 
 {% block content %}
 {% block content %}
 <div class="row">
 <div class="row">
@@ -8,8 +9,8 @@
       <h5 class="card-header">
       <h5 class="card-header">
         Virtual Machines
         Virtual Machines
       </h5>
       </h5>
-      <div class="card-body">
-        {% include 'inc/responsive_table.html' with table=virtualmachines_table %}
+      <div class="card-body table-responsive">
+        {% render_table virtualmachines_table 'inc/table.html' %}
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>