diff --git a/app/controllers/administrations_controller.rb b/app/controllers/administrations_controller.rb index 32b523b28..a2c628dee 100644 --- a/app/controllers/administrations_controller.rb +++ b/app/controllers/administrations_controller.rb @@ -5,13 +5,14 @@ class AdministrationsController < ApplicationController before_action :authenticate_administration! def index + @admin = Administrateur.new @admins = smart_listing_create :admins, - Administrateur.all, + Administrateur.all.order(:email), partial: "administrations/list", array: true - @admin = Administrateur.new + end def show diff --git a/app/views/administrations/_list.html.haml b/app/views/administrations/_list.html.haml index a08ac983f..da0db82cf 100644 --- a/app/views/administrations/_list.html.haml +++ b/app/views/administrations/_list.html.haml @@ -20,6 +20,7 @@ = smart_listing.paginate = smart_listing.pagination_per_page_links + - else %h4.center Aucun administrateur créé diff --git a/app/views/administrations/index.js.erb b/app/views/administrations/index.js.erb new file mode 100644 index 000000000..a8a88c76e --- /dev/null +++ b/app/views/administrations/index.js.erb @@ -0,0 +1 @@ +<%= smart_listing_update :admins %>