Commit df8735d724d0cf9a1ce03c48ce79ae5b12272a56
1 parent
68daacb6
Exists in
master
and in
29 other branches
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
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -625,7 +625,7 @@ module ApplicationHelper | @@ -625,7 +625,7 @@ module ApplicationHelper | ||
625 | def search_page_title(title, options={}) | 625 | def search_page_title(title, options={}) |
626 | title = "<h1>" + title + "</h1>" | 626 | title = "<h1>" + title + "</h1>" |
627 | title += "<h2 align='center'>" + _("Searched for '%s'") % options[:query] + "</h2>" if !options[:query].blank? | 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 | title += "<h2 align='center'>" + _("within %d from %s") % [options[:distance], options[:region]] + "</h2>" if !options[:distance].blank? && !options[:region].blank? | 629 | title += "<h2 align='center'>" + _("within %d from %s") % [options[:distance], options[:region]] + "</h2>" if !options[:distance].blank? && !options[:region].blank? |
630 | title += "<h2 align='center'>" + _("%d results found") % options[:total_results] + "</h2>" if !options[:total_results].blank? | 630 | title += "<h2 align='center'>" + _("%d results found") % options[:total_results] + "</h2>" if !options[:total_results].blank? |
631 | title | 631 | title |
app/views/search/people.rhtml
1 | <%= search_page_title( _('People'), { :query => @query, | 1 | <%= search_page_title( _('People'), { :query => @query, |
2 | - :category => @category, | 2 | + :category => @category ? @category.name : nil, |
3 | :total_results => @total_results, | 3 | :total_results => @total_results, |
4 | :region => @region ? @region.name : nil, | 4 | :region => @region ? @region.name : nil, |
5 | :distance => @radius } ) %> | 5 | :distance => @radius } ) %> |
app/views/search/products.rhtml
1 | <%= search_page_title( _('Products and Services'), { :query => @query, | 1 | <%= search_page_title( _('Products and Services'), { :query => @query, |
2 | - :category => @category, | 2 | + :category => @category ? @category.name : nil, |
3 | :total_results => @total_results, | 3 | :total_results => @total_results, |
4 | :region => @region ? @region.name : nil, | 4 | :region => @region ? @region.name : nil, |
5 | :distance => @radius } ) %> | 5 | :distance => @radius } ) %> |