|
|
@ -179,6 +179,7 @@ class UsersController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@users = scope.offset(@offset).limit(limit).all.reverse
|
|
|
|
@users = scope.offset(@offset).limit(limit).all.reverse
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@s_type = 0
|
|
|
|
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
|
|
|
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
|
|
|
# @projects = @projects[@offset, @limit]
|
|
|
|
# @projects = @projects[@offset, @limit]
|
|
|
|
when '1'
|
|
|
|
when '1'
|
|
|
@ -192,6 +193,7 @@ class UsersController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@users = scope.includes(:user_status).reorder('user_statuses.changesets_count').offset(@offset).limit(limit).all.reverse
|
|
|
|
@users = scope.includes(:user_status).reorder('user_statuses.changesets_count').offset(@offset).limit(limit).all.reverse
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@s_type = 1
|
|
|
|
#sort {|x,y| y.user_status.changesets_count <=> x.user_status.changesets_count}
|
|
|
|
#sort {|x,y| y.user_status.changesets_count <=> x.user_status.changesets_count}
|
|
|
|
#@users = @users[@offset, @limit]
|
|
|
|
#@users = @users[@offset, @limit]
|
|
|
|
when '2'
|
|
|
|
when '2'
|
|
|
@ -207,6 +209,7 @@ class UsersController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
#@users = @users[@offset, @limit]
|
|
|
|
#@users = @users[@offset, @limit]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@s_type = 2
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@offset ||= @user_pages.reverse_offset
|
|
|
|
@offset ||= @user_pages.reverse_offset
|
|
|
|
unless @offset == 0
|
|
|
|
unless @offset == 0
|
|
|
@ -218,6 +221,7 @@ class UsersController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@users = scope.offset(@offset).limit(limit).all.reverse
|
|
|
|
@users = scope.offset(@offset).limit(limit).all.reverse
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@s_type = 0
|
|
|
|
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
|
|
|
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
|
|
|
# @projects = @projects[@offset, @limit]
|
|
|
|
# @projects = @projects[@offset, @limit]
|
|
|
|
end
|
|
|
|
end
|
|
|
|