Commit bc76afad2853a08334ad126ab4843f4a715c2382

Authored by Rodrigo Souto
1 parent 54b00182

[pluginize-solr] Making actions to use shared view

app/controllers/public/search_controller.rb
... ... @@ -27,7 +27,7 @@ class SearchController < PublicController
27 27 @enabled_searches.select { |key,description| @searching[key] }.each do |key, description|
28 28 load_query
29 29 @asset = key
30   - send(:get_results, key)
  30 + send(key)
31 31 @order << key
32 32 @names[key] = getterm(description)
33 33 end
... ... @@ -43,7 +43,6 @@ class SearchController &lt; PublicController
43 43 else
44 44 @results[@asset] = @environment.articles.public.send(@filter).paginate(paginate_options)
45 45 end
46   - render :template => 'search/search_page'
47 46 end
48 47  
49 48 def contents
... ... @@ -56,7 +55,6 @@ class SearchController &lt; PublicController
56 55 else
57 56 @results[@asset] = visible_profiles(Person).send(@filter).paginate(paginate_options)
58 57 end
59   - render :template => 'search/search_page'
60 58 end
61 59  
62 60 def products
... ... @@ -65,7 +63,6 @@ class SearchController &lt; PublicController
65 63 else
66 64 @results[@asset] = @environment.products.send(@filter).paginate(paginate_options)
67 65 end
68   - render :template => 'search/search_page'
69 66 end
70 67  
71 68 def enterprises
... ... @@ -75,7 +72,6 @@ class SearchController &lt; PublicController
75 72 @filter_title = _('Enterprises from network')
76 73 @results[@asset] = visible_profiles(Enterprise, [{:products => :product_category}]).paginate(paginate_options)
77 74 end
78   - render :template => 'search/search_page'
79 75 end
80 76  
81 77 def communities
... ... @@ -84,7 +80,6 @@ class SearchController &lt; PublicController
84 80 else
85 81 @results[@asset] = visible_profiles(Community).send(@filter).paginate(paginate_options)
86 82 end
87   - render :template => 'search/search_page'
88 83 end
89 84  
90 85 def events
... ...
app/views/search/articles.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
app/views/search/communities.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
app/views/search/enterprises.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
app/views/search/people.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
app/views/search/products.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
plugins/solr/views/search/articles.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
plugins/solr/views/search/communities.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
plugins/solr/views/search/enterprises.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
plugins/solr/views/search/people.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...
plugins/solr/views/search/products.html.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +search_page.html.erb
0 2 \ No newline at end of file
... ...