From df8735d724d0cf9a1ce03c48ce79ae5b12272a56 Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Fri, 11 Jul 2008 00:02:19 +0000 Subject: [PATCH] ActionItem501: fixed the args of the search_page_title helper --- app/helpers/application_helper.rb | 2 +- app/views/search/people.rhtml | 2 +- app/views/search/products.rhtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0854fd5..bf68a67 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -625,7 +625,7 @@ module ApplicationHelper def search_page_title(title, options={}) title = "

" + title + "

" title += "

" + _("Searched for '%s'") % options[:query] + "

" if !options[:query].blank? - title += "

" + _("In category %s") % options[:category].name + "

" if !options[:category].blank? + title += "

" + _("In category %s") % options[:category] + "

" if !options[:category].blank? title += "

" + _("within %d from %s") % [options[:distance], options[:region]] + "

" if !options[:distance].blank? && !options[:region].blank? title += "

" + _("%d results found") % options[:total_results] + "

" if !options[:total_results].blank? title diff --git a/app/views/search/people.rhtml b/app/views/search/people.rhtml index ef75883..34048bb 100644 --- a/app/views/search/people.rhtml +++ b/app/views/search/people.rhtml @@ -1,5 +1,5 @@ <%= search_page_title( _('People'), { :query => @query, - :category => @category, + :category => @category ? @category.name : nil, :total_results => @total_results, :region => @region ? @region.name : nil, :distance => @radius } ) %> diff --git a/app/views/search/products.rhtml b/app/views/search/products.rhtml index 7f70008..03574bd 100644 --- a/app/views/search/products.rhtml +++ b/app/views/search/products.rhtml @@ -1,5 +1,5 @@ <%= search_page_title( _('Products and Services'), { :query => @query, - :category => @category, + :category => @category ? @category.name : nil, :total_results => @total_results, :region => @region ? @region.name : nil, :distance => @radius } ) %> -- libgit2 0.21.2