|
|
|
@ -376,12 +376,13 @@ class UsersController < ApplicationController
|
|
|
|
|
"show_changesets" => true
|
|
|
|
|
}
|
|
|
|
|
scope = User.logged.status(@status)
|
|
|
|
|
scope = scope.like(params[:name],params[:search_by][:id]) if params[:name].present?
|
|
|
|
|
@search_by = params[:search_by] ? params[:search_by][:id] : 0
|
|
|
|
|
scope = scope.like(params[:name],@search_by) if params[:name].present?
|
|
|
|
|
@user_count = scope.count
|
|
|
|
|
@user_pages = Paginator.new @user_count, @limit, params['page']
|
|
|
|
|
@user_base_tag = params[:id] ? 'base_users':'users_base'
|
|
|
|
|
@offset ||= @user_pages.reverse_offset
|
|
|
|
|
unless @offset == 0
|
|
|
|
|
unless @offset == 0
|
|
|
|
|
@users = scope.offset(@offset).limit(@limit).all.reverse
|
|
|
|
|
else
|
|
|
|
|
limit = @user_count % @limit
|
|
|
|
|