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