Commit df8735d724d0cf9a1ce03c48ce79ae5b12272a56

Authored by MoisesMachado
1 parent 68daacb6

ActionItem501: fixed the args of the search_page_title helper


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2206 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/application_helper.rb
... ... @@ -625,7 +625,7 @@ module ApplicationHelper
625 625 def search_page_title(title, options={})
626 626 title = "<h1>" + title + "</h1>"
627 627 title += "<h2 align='center'>" + _("Searched for '%s'") % options[:query] + "</h2>" if !options[:query].blank?
628   - title += "<h2 align='center'>" + _("In category %s") % options[:category].name + "</h2>" if !options[:category].blank?
  628 + title += "<h2 align='center'>" + _("In category %s") % options[:category] + "</h2>" if !options[:category].blank?
629 629 title += "<h2 align='center'>" + _("within %d from %s") % [options[:distance], options[:region]] + "</h2>" if !options[:distance].blank? && !options[:region].blank?
630 630 title += "<h2 align='center'>" + _("%d results found") % options[:total_results] + "</h2>" if !options[:total_results].blank?
631 631 title
... ...
app/views/search/people.rhtml
1 1 <%= search_page_title( _('People'), { :query => @query,
2   - :category => @category,
  2 + :category => @category ? @category.name : nil,
3 3 :total_results => @total_results,
4 4 :region => @region ? @region.name : nil,
5 5 :distance => @radius } ) %>
... ...
app/views/search/products.rhtml
1 1 <%= search_page_title( _('Products and Services'), { :query => @query,
2   - :category => @category,
  2 + :category => @category ? @category.name : nil,
3 3 :total_results => @total_results,
4 4 :region => @region ? @region.name : nil,
5 5 :distance => @radius } ) %>
... ...