全站搜索是不输入条件搜索结果为空
This commit is contained in:
parent
0f6d2676e5
commit
73ed8b9558
|
@ -66,17 +66,20 @@ class FilesController < ApplicationController
|
|||
q = "%#{params[:name].strip}%"
|
||||
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||
if params[:insite]
|
||||
@result = find_public_attache q,sort
|
||||
@result = visable_attachemnts_insite @result,@course
|
||||
@searched_attach = paginateHelper @result,10
|
||||
if q == "%%"
|
||||
@result = []
|
||||
@searched_attach = paginateHelper @result,10
|
||||
else
|
||||
@result = find_public_attache q,sort
|
||||
@result = visable_attachemnts_insite @result,@course
|
||||
@searched_attach = paginateHelper @result,10
|
||||
end
|
||||
else
|
||||
@result = find_course_attache q,@course,sort
|
||||
@result = visable_attachemnts @result
|
||||
@searched_attach = paginateHelper @result,10
|
||||
@tag_list = attachment_tag_list @result
|
||||
end
|
||||
|
||||
@tag_list = attachment_tag_list @searched_attach
|
||||
|
||||
#rescue Exception => e
|
||||
# #render 'stores'
|
||||
# redirect_to search_course_files_url
|
||||
|
|
Loading…
Reference in New Issue