diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4f037de8a44..86e6ad8ad3a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -270,8 +270,8 @@ def paginate_list @search_by = params[:search_by] # Sets the number of users to display per page based on the 'per_page' parameter from the request. - # If no 'per_page' parameter is provided, it defaults to '4', which corresponds to displaying all users on one page. - @per_page = '3' + # If no 'per_page' parameter is provided, it defaults to '3', which corresponds to displaying all users on one page. + @per_page = params[:per_page] || '3' # search for corresponding users # users = User.search_users(role, user_id, letter, @search_by) diff --git a/app/views/users/list.html.erb b/app/views/users/list.html.erb index 57422087b6b..177bf7391f0 100644 --- a/app/views/users/list.html.erb +++ b/app/views/users/list.html.erb @@ -8,16 +8,22 @@ <%= form_tag :action => 'list', :paginate_show => '1', :num_users => @per_page do %> <%= label_tag :letter, 'Search users: ' %><%= text_field_tag(:letter,params[:letter]) %> -<%= select_tag(:search_by, options_for_select([['Username', 1], ['Full name', 2], ['Email', 3]])) %> +<%= select_tag(:search_by, options_for_select([['Username', 1], ['Name', 2], ['Email', 3]])) %> <%= submit_tag("Search") %> <% end %> +<%= form_tag :action => 'list', :paginate_show => '1', :num_users => @per_page do %> + <%= label_tag :letter, 'Number of users displayed per page' %><%= text_field_tag(:letter,params[:per_page]) %> +<%= select_tag(:search_by, options_for_select([['25 users', 1], ['50 users', 2], ['100 users', 3], ['All users', 4]])) %> +<%= submit_tag("List") %> +<% end %> + <%= render :partial => 'links' %>
E-mail on ... | ||||||||
---|---|---|---|---|---|---|---|---|
User Name | Full Name | Email Address | Role | Parent | Review | Submission | Meta-review | Delete |
User Name | Name | Email Address | Role | Parent | Review | Submission | Meta-review | Delete |