Commit 6c0daae0cbf7d10a4bd5f9db562f2af52fc24b6f

Authored by AntonioTerceiro
1 parent 27983b88

ActionItem501: hiding "see in map" for stuff that has no geographical

information (yet)

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2271 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/search_helper.rb
@@ -15,9 +15,9 @@ module SearchHelper @@ -15,9 +15,9 @@ module SearchHelper
15 (query.downcase.scan(/"[^"]*"?|'[^']*'?|[^'"\s]+/) - (STOP_WORDS[locale] || [])).join(' ') 15 (query.downcase.scan(/"[^"]*"?|'[^']*'?|[^'"\s]+/) - (STOP_WORDS[locale] || [])).join(' ')
16 end 16 end
17 17
18 - def display_results 18 + def display_results(use_map = true)
19 19
20 - unless GoogleMaps.enabled? 20 + unless use_map && GoogleMaps.enabled?
21 return render(:partial => 'display_results') 21 return render(:partial => 'display_results')
22 end 22 end
23 23
app/views/search/people.rhtml
@@ -6,7 +6,8 @@ @@ -6,7 +6,8 @@
6 6
7 <%= render :partial => 'search_form', :locals => { :form_title => @query.blank? ? _('Search') : _("Refine your search"), :simple_search => true } %> 7 <%= render :partial => 'search_form', :locals => { :form_title => @query.blank? ? _('Search') : _("Refine your search"), :simple_search => true } %>
8 8
9 -<%= display_results %> 9 +<%# FIXME ARMENGUE %>
  10 +<%= display_results(false) %>
10 11
11 <%= pagination_links @results.values.first %> 12 <%= pagination_links @results.values.first %>
12 13