admin(major): add pagination to all listviews
This commit is contained in:
		| @ -41,5 +41,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -58,5 +58,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -41,5 +41,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -39,5 +39,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -58,5 +58,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -48,5 +48,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -66,5 +66,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -52,5 +52,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -42,5 +42,6 @@ | |||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tbody> |         </tbody> | ||||||
|     </table> |     </table> | ||||||
|  |     {% include 'partials/pagination.html' %} | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ class ApplicationListView(AdminRequiredMixin, ListView): | |||||||
|  |  | ||||||
|     model = Application |     model = Application | ||||||
|     ordering = 'name' |     ordering = 'name' | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/application/list.html' |     template_name = 'administration/application/list.html' | ||||||
|  |  | ||||||
|     def get_queryset(self): |     def get_queryset(self): | ||||||
|  | |||||||
| @ -22,6 +22,7 @@ class FactorListView(AdminRequiredMixin, ListView): | |||||||
|     model = Factor |     model = Factor | ||||||
|     template_name = 'administration/factor/list.html' |     template_name = 'administration/factor/list.html' | ||||||
|     ordering = 'order' |     ordering = 'order' | ||||||
|  |     paginate_by = 40 | ||||||
|  |  | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|         kwargs['types'] = { |         kwargs['types'] = { | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ class GroupListView(AdminRequiredMixin, ListView): | |||||||
|  |  | ||||||
|     model = Group |     model = Group | ||||||
|     ordering = 'name' |     ordering = 'name' | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/group/list.html' |     template_name = 'administration/group/list.html' | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -16,6 +16,8 @@ class InvitationListView(AdminRequiredMixin, ListView): | |||||||
|     """Show list of all invitations""" |     """Show list of all invitations""" | ||||||
|  |  | ||||||
|     model = Invitation |     model = Invitation | ||||||
|  |     ordering = 'expires' | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/invitation/list.html' |     template_name = 'administration/invitation/list.html' | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -19,6 +19,8 @@ class PolicyListView(AdminRequiredMixin, ListView): | |||||||
|     """Show list of all policies""" |     """Show list of all policies""" | ||||||
|  |  | ||||||
|     model = Policy |     model = Policy | ||||||
|  |     ordering = 'name' | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/policy/list.html' |     template_name = 'administration/policy/list.html' | ||||||
|  |  | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|  | |||||||
| @ -23,6 +23,7 @@ class PropertyMappingListView(AdminRequiredMixin, ListView): | |||||||
|     model = PropertyMapping |     model = PropertyMapping | ||||||
|     template_name = 'administration/property_mapping/list.html' |     template_name = 'administration/property_mapping/list.html' | ||||||
|     ordering = 'name' |     ordering = 'name' | ||||||
|  |     paginate_by = 40 | ||||||
|  |  | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|         kwargs['types'] = { |         kwargs['types'] = { | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ class ProviderListView(AdminRequiredMixin, ListView): | |||||||
|     """Show list of all providers""" |     """Show list of all providers""" | ||||||
|  |  | ||||||
|     model = Provider |     model = Provider | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/provider/list.html' |     template_name = 'administration/provider/list.html' | ||||||
|  |  | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|  | |||||||
| @ -20,6 +20,8 @@ class SourceListView(AdminRequiredMixin, ListView): | |||||||
|     """Show list of all sources""" |     """Show list of all sources""" | ||||||
|  |  | ||||||
|     model = Source |     model = Source | ||||||
|  |     ordering = 'name' | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/source/list.html' |     template_name = 'administration/source/list.html' | ||||||
|  |  | ||||||
|     def get_context_data(self, **kwargs): |     def get_context_data(self, **kwargs): | ||||||
|  | |||||||
| @ -16,6 +16,8 @@ class UserListView(AdminRequiredMixin, ListView): | |||||||
|     """Show list of all users""" |     """Show list of all users""" | ||||||
|  |  | ||||||
|     model = User |     model = User | ||||||
|  |     ordering = 'username' | ||||||
|  |     paginate_by = 40 | ||||||
|     template_name = 'administration/user/list.html' |     template_name = 'administration/user/list.html' | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -32,16 +32,8 @@ class LDAPSource(Source): | |||||||
|     sync_parent_group = models.ForeignKey(Group, blank=True, null=True, |     sync_parent_group = models.ForeignKey(Group, blank=True, null=True, | ||||||
|                                           default=None, on_delete=models.SET_DEFAULT) |                                           default=None, on_delete=models.SET_DEFAULT) | ||||||
|  |  | ||||||
|     # This field is written to by the sync_* tasks |  | ||||||
|     # displayed by additional_info |  | ||||||
|     status = models.TextField(default="") |  | ||||||
|  |  | ||||||
|     form = 'passbook.sources.ldap.forms.LDAPSourceForm' |     form = 'passbook.sources.ldap.forms.LDAPSourceForm' | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def additional_info(self): |  | ||||||
|         return self.status |  | ||||||
|  |  | ||||||
|     class Meta: |     class Meta: | ||||||
|  |  | ||||||
|         verbose_name = _('LDAP Source') |         verbose_name = _('LDAP Source') | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Langhammer, Jens
					Langhammer, Jens