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