fix announcement

This commit is contained in:
Matthew K. Fu JuYuan 2012-09-25 09:52:13 +08:00
parent 87e2510d02
commit 7a523281c3
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
@search = Bulletin.solr_search do @search = Bulletin.solr_search do
fulltext params[:search_query] fulltext params[:search_query]
with(:frontend_search,true) with(:frontend_search,true)
with(:available_lang, any_of([I18n.locale.to_s])) with(:available_lang).any_of([I18n.locale.to_s])
end end
search_result = @search.results.collect{|result| result.id}.desc(:postdate) search_result = @search.results.collect{|result| result.id}
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).desc(:postdate).page( params[:page_main]).per(15) @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).desc(:postdate).page( params[:page_main]).per(15)
else else