diff --git a/config/locales/en.yml b/config/locales/en.yml index 3966c8936..06f7ae64f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -298,4 +298,5 @@ en: domains: Google Search Domains site_search: Site Search sitesearch: Google Site Search - site_setting_help: Please Enter the search argument for Google search. \ No newline at end of file + site_setting_help: Please Enter the search argument for Google search. + result_get: "Found %{item_num} items" diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index c06bdf077..001352761 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -436,6 +436,7 @@ zh_tw: site_search: "全站搜尋" sitesearch: Google Site Search site_setting_help: 請輸入送交Google搜尋的參數 + result_get: "共搜尋到%{item_num}筆資料" activerecord: errors: template: # ~ 2.3.5 backward compatible diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb index 33f5df004..bcbffe60a 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb @@ -12,8 +12,9 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController if !params[:search_query].blank? search_cond = {:is_checked=>true,:is_hidden=>false} search_cond.merge!({:bulletin_category_id => "#{params[:category_id]}" }) if !params[:category_id].blank? - search = Redis::Search.query("Bulletin", params[:search_query], :conditions =>search_cond) + search = Redis::Search.query("Bulletin", params[:search_query], :conditions =>search_cond,:limit=>Bulletin.all.count) search_result = search.collect{|t| t["id"]} + @bulletins = Bulletin.all.can_display.any_in(_id:search_result).page( params[:page_main]).per(10) else date_now = Time.now diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb index 4ba18b51e..228ce31c5 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb @@ -15,7 +15,11 @@
<%= display_date(post.postdate) %> |