diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 4cdcd84776ff097150d2c0a3001f93f199d55888..387e155c57dbed9a2ffd76d979197c6227f2129b 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 3164b6cefc6505956adfc8c77eb07a84c655bb74..b161dcbcd90a13939ca78fddb993908723e7f261 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 %>