Browse Source

pagination

Élie Bouttier 8 years ago
parent
commit
255ae724fc

+ 5 - 0
adhesions/templates/adhesions/adhesion_list.html

@@ -1,4 +1,5 @@
 {% extends 'admin.html' %}
+{% load bootstrap3 %}
 
 {% block breadcrumb %}
 <li class="active">Adhérents</li>
@@ -34,4 +35,8 @@
     {% endif %}
     {% endfor %}
 </div>
+
+<div class="text-center">
+    {% bootstrap_pagination page_obj %}
+</div>
 {% endblock %}

+ 5 - 0
adhesions/templates/adhesions/corporation_list.html

@@ -1,4 +1,5 @@
 {% extends 'admin.html' %}
+{% load bootstrap3 %}
 
 {% block breadcrumb %}
 {{ block.super }}
@@ -32,4 +33,8 @@
     {% endif %}
     {% endfor %}
 </div>
+
+<div class="text-center">
+    {% bootstrap_pagination page_obj %}
+</div>
 {% endblock %}

+ 5 - 0
adhesions/templates/adhesions/user_list.html

@@ -1,4 +1,5 @@
 {% extends 'admin.html' %}
+{% load bootstrap3 %}
 
 {% block breadcrumb %}
 {{ block.super }}
@@ -36,4 +37,8 @@
     {% endif %}
     {% endfor %}
 </div>
+
+<div class="text-center">
+    {% bootstrap_pagination page_obj %}
+</div>
 {% endblock %}

+ 3 - 2
adhesions/views.py

@@ -42,6 +42,7 @@ class UserMixin(PermissionRequiredMixin):
 
 class UserList(UserMixin, ListView):
     template_name = 'adhesions/user_list.html'
+    paginate_by = 50
 
 
 class UserDetail(UserMixin, DetailView):
@@ -109,7 +110,7 @@ class CorporationMixin(PermissionRequiredMixin):
 
 
 class CorporationList(CorporationMixin, ListView):
-    pass
+    paginate_by = 50
 
 
 class CorporationDetail(CorporationMixin, DetailView):
@@ -130,7 +131,7 @@ class AdhesionMixin(PermissionRequiredMixin):
 
 
 class AdhesionList(AdhesionMixin, ListView):
-    pass
+    paginate_by = 50
 
 
 class AdhesionDetail(AdhesionMixin, DetailView):

+ 4 - 0
banking/templates/banking/payment_list.html

@@ -37,4 +37,8 @@
     </div>
     {% endfor %}
 </div>
+
+<div class="text-center">
+    {% bootstrap_pagination page_obj %}
+</div>
 {% endblock %}

+ 1 - 1
banking/views.py

@@ -12,7 +12,7 @@ class PaymentMixin(PermissionRequiredMixin):
 
 
 class PaymentList(PaymentMixin, ListView):
-    pass
+    paginate_by = 50
 
 
 class PaymentDetail(PaymentMixin, DetailView):

+ 4 - 0
services/templates/services/ipresource_list.html

@@ -50,6 +50,10 @@
     {% endfor %}
 </div>
 
+<div class="text-center">
+    {% bootstrap_pagination page_obj %}
+</div>
+
 {% deallocate_modal_div %}
 {% endblock %}
 

+ 4 - 0
services/templates/services/service_list.html

@@ -45,4 +45,8 @@
     </div>
     {% endfor %}
 </div>
+
+<div class="text-center">
+    {% bootstrap_pagination page_obj %}
+</div>
 {% endblock %}

+ 2 - 2
services/views.py

@@ -17,7 +17,7 @@ class ServiceMixin(PermissionRequiredMixin):
 
 
 class ServiceList(ServiceMixin, ListView):
-    pass
+    paginate_by = 50
 
 
 class ServiceCreate(ServiceMixin, CreateView):
@@ -87,7 +87,7 @@ class IPResourceMixin(PermissionRequiredMixin):
 
 
 class IPResourceList(IPResourceMixin, ListView):
-    pass
+    paginate_by = 50
 
 
 class IPResourceDetail(IPResourceMixin, DetailView):