jeremystretch пре 4 година
родитељ
комит
8ed79d5973

+ 0 - 27
netbox/templates/inc/table_controls.html

@@ -1,27 +0,0 @@
-<div class="row mb-3 justify-content-between">
-  <div class="table-controls noprint col col-12 col-md-8 col-lg-4">
-    <div class="input-group input-group-sm">
-      <input
-        type="text"
-        class="form-control object-filter"
-        placeholder="Quick find"
-        title="Find in the results below (regular expressions supported)"
-      />
-    </div>
-  </div>
-  <div class="table-controls noprint col col-md-3 mb-0">
-    {% if request.user.is_authenticated and table_modal %}
-      <div class="table-configure input-group input-group-sm">
-        <button
-          type="button"
-          data-bs-toggle="modal"
-          title="Configure Table"
-          data-bs-target="#{{ table_modal }}"
-          class="btn btn-sm btn-outline-dark"
-        >
-          <i class="mdi mdi-cog"></i> Configure Table
-        </button>
-      </div>
-    {% endif %}
-  </div>
-</div>

+ 4 - 1
netbox/templates/ipam/ipaddress_assign.html

@@ -2,6 +2,7 @@
 {% load static %}
 {% load form_helpers %}
 {% load helpers %}
+{% load render_table from django_tables2 %}
 
 {% block title %}Assign an IP Address{% endblock title %}
 
@@ -35,7 +36,9 @@
         <div class="row mb-3">
             <div class="col col-md-12">
                 <h3>Search Results</h3>
-                {% include 'utilities/obj_table.html' %}
+                <div class="table-responsive">
+                  {% render_table table 'inc/table.html' %}
+                </div>
             </div>
         </div>
     {% endif %}

+ 0 - 62
netbox/templates/utilities/obj_table.html

@@ -1,62 +0,0 @@
-{% load helpers %}
-{% load render_table from django_tables2 %}
-
-{% if permissions.change or permissions.delete %}
-    <form method="post" class="form form-horizontal">
-        {% csrf_token %}
-        <input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />
-
-        {% if table.paginator.num_pages > 1 %}
-            <div id="select-all-box" class="d-none card noprint">
-              <div class="card-body">
-                <div class="float-end">
-                    {% if bulk_edit_url and permissions.change %}
-                        <button type="submit" name="_edit" formaction="{% url bulk_edit_url %}{% if bulk_querystring %}?{{ bulk_querystring }}{% elif request.GET %}?{{ request.GET.urlencode }}{% endif %}" class="btn btn-warning btn-sm" disabled="disabled">
-                            <span class="mdi mdi-pencil" aria-hidden="true"></span> Edit All
-                        </button>
-                    {% endif %}
-                    {% if bulk_delete_url and permissions.delete %}
-                        <button type="submit" name="_delete" formaction="{% url bulk_delete_url %}{% if bulk_querystring %}?{{ bulk_querystring }}{% elif request.GET %}?{{ request.GET.urlencode }}{% endif %}" class="btn btn-danger btn-sm" disabled="disabled">
-                            <span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete All
-                        </button>
-                    {% endif %}
-                </div>
-                <div class="form-check">
-                    <input type="checkbox" id="select-all" name="_all" class="form-check-input" />
-                    <label for="select-all" class="form-check-label">
-                    Select <strong>all {{ table.objects_count }} {{ table.data.verbose_name_plural }}</strong> matching query
-                    </label>
-                </div>
-              </div>
-            </div>
-        {% endif %}
-
-        <div class="table-responsive">
-          {% render_table table 'inc/table.html' %}
-        </div>
-
-        <div class="float-start noprint">
-            {% block extra_actions %}{% endblock %}
-
-            {% if bulk_edit_url and permissions.change %}
-                <button type="submit" name="_edit" formaction="{% url bulk_edit_url %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}" class="btn btn-warning btn-sm">
-                    <i class="mdi mdi-pencil" aria-hidden="true"></i> Edit Selected
-                </button>
-            {% endif %}
-
-            {% if bulk_delete_url and permissions.delete %}
-                <button type="submit" name="_delete" formaction="{% url bulk_delete_url %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}" class="btn btn-danger btn-sm">
-                    <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete Selected
-                </button>
-            {% endif %}
-        </div>
-    </form>
-{% else %}
-
-    <div class="table-responsive">
-      {% render_table table 'inc/table.html' %}
-    </div>
-
-{% endif %}
-
-{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}