Commit a2034e10873863cb861102a2d408230fd79b4722
1 parent
325689ad
Overall fixes:
- Search controller to only show communities - Translation from search catalog Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
3 changed files
with
8 additions
and
2 deletions
Show diff stats
lib/ext/search_controller.rb
... | ... | @@ -7,7 +7,12 @@ class SearchController |
7 | 7 | full_text_search |
8 | 8 | results = @searches[@asset][:results] |
9 | 9 | |
10 | - results = results.each {|community| !community.software? and !community.institution?} | |
10 | + communities = [] | |
11 | + results.find_each do |community| | |
12 | + communities << community if (!community.software? and !community.institution?) | |
13 | + end | |
14 | + | |
15 | + results = communities.paginate(:per_page => 24, :page => params[:page]) | |
11 | 16 | @searches[@asset] = {:results => results} |
12 | 17 | @search = results |
13 | 18 | end | ... | ... |
po/pt/software_communities.po
... | ... | @@ -1091,7 +1091,7 @@ msgid "" |
1091 | 1091 | "Type words about the software_info you're looking for (the search begins " |
1092 | 1092 | "after 3 characters)" |
1093 | 1093 | msgstr "Digite palavras sobre o software que você está procurando (a busca " |
1094 | -"automática começa após 3 letras") | |
1094 | +"automática começa após 3 letras)" | |
1095 | 1095 | |
1096 | 1096 | #: plugins/software_communities/views/search/_software_search_form.html.erb:18 |
1097 | 1097 | msgid "Filter" | ... | ... |
test/functional/search_controller_test.rb
... | ... | @@ -75,6 +75,7 @@ class SearchControllerTest < ActionController::TestCase |
75 | 75 | |
76 | 76 | community_template = create_community("New Community Template") |
77 | 77 | community_template.is_template = true |
78 | + community_template.visible = false | |
78 | 79 | community_template.save! |
79 | 80 | |
80 | 81 | get :communities, :query => "New" | ... | ... |