[Git][noosfero/noosfero][master] 3 commits: Fixing search scope for pg_search_plugin

Rodrigo Souto gitlab at mg.gitlab.com
Mon Sep 10 17:04:59 BRT 2018


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
77541138 by Alax Alves at 2018-09-05T15:02:08Z
Fixing search scope for pg_search_plugin

Signed-off-by: Matheus Richard <matheusrichardt at gmail.com>

- - - - -
21466909 by Matheus Richard at 2018-09-08T00:44:45Z
Improving sample-profiles script

- - - - -
70545edc by Rodrigo Souto at 2018-09-10T20:04:56Z
Merge branch 'issue-6837' into 'master'

Fixing search scope for pg_search_plugin

See merge request noosfero/noosfero!1609
- - - - -


4 changed files:

- plugins/pg_search/lib/pg_search_plugin.rb
- plugins/pg_search/po/pt/pg_search.po
- plugins/pg_search/views/box_organizer/_profile_search_block.html.erb
- script/sample-profiles


Changes:

=====================================
plugins/pg_search/lib/pg_search_plugin.rb
=====================================
@@ -56,7 +56,7 @@ class PgSearchPlugin < Noosfero::Plugin
 
     @asset, @base_scope = asset, scope
 
-    scope = scope.send(params[:filter]) if params[:filter] && params[:filter] != 'more_relevant'
+    scope = scope.send(params[:order]) if params[:order] && params[:order] != 'more_relevant'
 
     scope = filter_by_periods(scope, periods) if params[:periods].present?
     scope = filter_by_facets(scope, facets) if params[:facets].present?


=====================================
plugins/pg_search/po/pt/pg_search.po
=====================================
@@ -75,6 +75,10 @@ msgstr "Limpar filtros"
 msgid "Enable advanced search"
 msgstr "Ativar busca avançada"
 
+#: ../views/box_organizer/_profile_search_block.html.erb:4
+msgid "Customized Search Fields"
+msgstr "Campos de Busca Customizados"
+
 #: ../views/profile_search/_facets.html.erb:3
 msgid "Advanced Search"
 msgstr "Busca Avançada"


=====================================
plugins/pg_search/views/box_organizer/_profile_search_block.html.erb
=====================================
@@ -1,7 +1,7 @@
 <% if environment.plugin_enabled? PgSearchPlugin %>
   <% class_eval { include PgSearchPlugin::SearchHelper } %>
   <%= labelled_check_box(_('Enable advanced search'), 'block[advanced_search]', true, @block.advanced_search) %>
-  <h2>Campos de Busca Customizados</h2>
+  <h2><%=_('Customized Search Fields')%></h2>
   <div class="search-fields-options">
     <% (default_search_fields | custom_field_names(Article, @block.owner.articles)).each do |search_field| %>
       <div>


=====================================
script/sample-profiles
=====================================
@@ -128,8 +128,8 @@ done
 
 
 communities = []
-VERBS = ['Save', 'I like', 'Use']
-STUFF = ['Free Software', 'Organic food', 'the wales', 'the environment']
+VERBS = ['Save', 'I like', 'Use', 'Lovers of', 'Rehabilitate']
+STUFF = ['Free Software', 'Organic food', 'the wales', 'the environment', 'Vegan Food', 'Vegetarians']
 print "Creating communities: "
 for verb in VERBS
   for stuff in STUFF



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/fcfbbcd96740bff9006452b2177a34e63118af5b...70545edcbbb5441a87ba50f211c4571aa8c261db

-- 
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/fcfbbcd96740bff9006452b2177a34e63118af5b...70545edcbbb5441a87ba50f211c4571aa8c261db
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180910/57b99d12/attachment-0001.html>


More information about the Noosfero-dev mailing list