From eca5e86f37a4a4df35e2544b3053dff48807c908 Mon Sep 17 00:00:00 2001 From: pabois <pierreandre.boissinot@noesya.coop> Date: Tue, 26 Oct 2021 12:30:23 +0200 Subject: [PATCH] affichage --- app/controllers/admin/users_controller.rb | 2 +- app/views/admin/users/index.html.erb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 4cdcd8477..387e155c5 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -2,7 +2,7 @@ class Admin::UsersController < Admin::ApplicationController load_and_authorize_resource def index - @users = current_university.users.ordered + @users = current_university.users.ordered.page(params[:page]) breadcrumb end diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index 3164b6cef..b161dcbcd 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -1,4 +1,5 @@ -<% content_for :title, User.model_name.human(count: 2) %> +<% content_for :title, "#{User.model_name.human(count: 2)} (#{@users.total_count})" %> + <table class="table"> <thead> @@ -29,6 +30,7 @@ <% end %> </tbody> </table> +<%= paginate @users, theme: 'bootstrap-5' %> <% content_for :action_bar_right do %> <%= create_link User %> -- GitLab