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

Fixes #2795: Fix duplicate display of pagination controls on child prefix/IP tables

Jeremy Stretch 7 лет назад
Родитель
Сommit
22eebbbc71
4 измененных файлов с 3 добавлено и 7 удалено
  1. 1 0
      CHANGELOG.md
  2. 1 0
      netbox/templates/extras/tag.html
  3. 0 6
      netbox/templates/panel_table.html
  4. 1 1
      netbox/templates/search.html

+ 1 - 0
CHANGELOG.md

@@ -14,6 +14,7 @@ v2.5.4 (FUTURE)
 
 
 * [#2779](https://github.com/digitalocean/netbox/issues/2779) - Include "none" option when filter IP addresses by role
 * [#2779](https://github.com/digitalocean/netbox/issues/2779) - Include "none" option when filter IP addresses by role
 * [#2783](https://github.com/digitalocean/netbox/issues/2783) - Fix AttributeError exception when attempting to delete region(s)
 * [#2783](https://github.com/digitalocean/netbox/issues/2783) - Fix AttributeError exception when attempting to delete region(s)
+* [#2795](https://github.com/digitalocean/netbox/issues/2795) - Fix duplicate display of pagination controls on child prefix/IP tables
 * [#2798](https://github.com/digitalocean/netbox/issues/2798) - Properly URL-encode "map it" link on site view
 * [#2798](https://github.com/digitalocean/netbox/issues/2798) - Properly URL-encode "map it" link on site view
 
 
 ---
 ---

+ 1 - 0
netbox/templates/extras/tag.html

@@ -64,6 +64,7 @@
         </div>
         </div>
         <div class="col-md-6">
         <div class="col-md-6">
             {% include 'panel_table.html' with table=items_table heading='Tagged Objects' %}
             {% include 'panel_table.html' with table=items_table heading='Tagged Objects' %}
+            {% include 'inc/paginator.html' with paginator=items_table.paginator page=items_table.page %}
         </div>
         </div>
     </div>
     </div>
 {% endblock %}
 {% endblock %}

+ 0 - 6
netbox/templates/panel_table.html

@@ -12,9 +12,3 @@
         <div class="panel-body text-muted">None</div>
         <div class="panel-body text-muted">None</div>
     {% endif %}
     {% endif %}
 </div>
 </div>
-
-{% if table.rows and not hide_paginator %}
-    {% with paginator=table.paginator page=table.page %}
-        {% include 'inc/paginator.html' %}
-    {% endwith %}
-{% endif %}

+ 1 - 1
netbox/templates/search.html

@@ -12,7 +12,7 @@
                 <div class="col-md-10">
                 <div class="col-md-10">
                     {% for obj_type in results %}
                     {% for obj_type in results %}
                         <h3 id="{{ obj_type.name|lower }}">{{ obj_type.name|bettertitle }}</h3>
                         <h3 id="{{ obj_type.name|lower }}">{{ obj_type.name|bettertitle }}</h3>
-                        {% include 'panel_table.html' with table=obj_type.table hide_paginator=True %}
+                        {% include 'panel_table.html' with table=obj_type.table %}
                         <a href="{{ obj_type.url }}" class="btn btn-primary pull-right">
                         <a href="{{ obj_type.url }}" class="btn btn-primary pull-right">
                             <span class="fa fa-arrow-right" aria-hidden="true"></span>
                             <span class="fa fa-arrow-right" aria-hidden="true"></span>
                             {% if obj_type.table.page.has_next %}
                             {% if obj_type.table.page.has_next %}