removed search from widget for now.

This commit is contained in:
saurabhbhatia 2013-12-20 18:43:17 +08:00
parent 84edbdb6db
commit 0924f1fcde
3 changed files with 1 additions and 14 deletions

View File

@ -48,18 +48,6 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
# end # end
def search_result
if params[:search_query] == ""
redirect_to panel_announcement_front_end_search_result_path
else
@search = Bulletin.tire.search "#{params[:search_query]}"
search_result = @search.collect{|result| result.id}
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_in(_id:search_result).page( params[:page_main]).per(@page_num)
redirect_to panel_announcement_front_end_search_result_path(params[:search_result])
end
end
def bulletins_list_and_pic def bulletins_list_and_pic
if params[:widget_data_count] if params[:widget_data_count]

View File

@ -1,5 +1,5 @@
<p>Search</p> <p>Search</p>
<%= form_tag panel_announcement_widget_search_result_path, method: :get do %> <%= form_tag panel_announcement_front_end_search_result_path, method: :get do %>
<%= hidden_field_tag :category_id, params[:category_id] %> <%= hidden_field_tag :category_id, params[:category_id] %>
<%= hidden_field_tag :tag_id, params[:tag_id] %> <%= hidden_field_tag :tag_id, params[:tag_id] %>
<p> <p>

View File

@ -39,7 +39,6 @@ Rails.application.routes.draw do
match "reload_web_links" => "bulletins#reload_web_links" match "reload_web_links" => "bulletins#reload_web_links"
match "bulletins_side_bar" => "bulletins#bulletins_side_bar" match "bulletins_side_bar" => "bulletins#bulletins_side_bar"
match "bulletins_search_block" => "bulletins#bulletins_search_block" match "bulletins_search_block" => "bulletins#bulletins_search_block"
match "search_result" => "bulletins#search_result"
end end
end end
end end