|
|
|
@ -940,7 +940,7 @@ class UsersController < ApplicationController
|
|
|
|
|
@limit = 16
|
|
|
|
|
if 1 == @index
|
|
|
|
|
# @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
|
|
|
|
|
@shixuns_result = Shixun.where("name like ? and hidden=0", "%#{@search}%").reorder("myshixuns_count desc")
|
|
|
|
|
@shixuns_result = Shixun.where("name like ? and hidden=0 and status != -1", "%#{@search}%").reorder("myshixuns_count desc")
|
|
|
|
|
@shixuns_result_count = @shixuns_result.count
|
|
|
|
|
@shixun_pages = Paginator.new @shixuns_result_count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @shixun_pages.offset
|
|
|
|
|