From 36ca0754339422106aba71eca6270cfcde4ac3a5 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 27 Feb 2019 18:46:06 +0100 Subject: [PATCH] Use Django actions_on_bottom mechanic --- useradmin/templates/admin/change_list.html | 4 ++-- users/admin.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/useradmin/templates/admin/change_list.html b/useradmin/templates/admin/change_list.html index d99b0565..ebf4d148 100644 --- a/useradmin/templates/admin/change_list.html +++ b/useradmin/templates/admin/change_list.html @@ -80,9 +80,9 @@ {% endif %} {% block result_list %} - {% if action_form and cl.show_admin_actions %}{% admin_actions %}{% endif %} + {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} {% result_list cl %} - {% if action_form and cl.show_admin_actions %}{% admin_actions %}{% endif %} + {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} {% endblock %} {% block pagination %}{% pagination cl %}{% endblock %} diff --git a/users/admin.py b/users/admin.py index f9877704..c48f0bb3 100644 --- a/users/admin.py +++ b/users/admin.py @@ -88,6 +88,7 @@ class LdapServiceUserGroupAdmin(admin.ModelAdmin): class SchoolAdmin(VersionAdmin): """Administration, gestion des écoles""" list_display = ('name',) + actions_on_bottom = True class ListRightAdmin(VersionAdmin): @@ -99,6 +100,7 @@ class ListRightAdmin(VersionAdmin): class ListShellAdmin(VersionAdmin): """Gestion de la liste des shells coté admin""" list_display = ('shell',) + actions_on_bottom = True class RequestAdmin(admin.ModelAdmin):