From 28011292d60072a593b6b5a3d6f36555ad599ce8 Mon Sep 17 00:00:00 2001 From: JoenioCosta Date: Fri, 4 Jul 2008 00:23:35 +0000 Subject: [PATCH] ActionItem512: add distance to google map information block --- app/helpers/search_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index f955283..b73eced 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -48,7 +48,6 @@ module SearchHelper end def display_profile_info(profile) - # FIXME add distance data = '' unless profile.contact_email.nil? data << content_tag('strong', _('E-Mail: ')) + profile.contact_email + '
' @@ -65,6 +64,9 @@ module SearchHelper unless profile.products.empty? data << content_tag('strong', _('Products/Services: ')) + profile.products.map{|i| link_to(i.name, :controller => 'catalog', :profile => profile.identifier, :action => 'show', :id => i)}.join(', ') + '
' end + if profile.respond_to?(:distance) and !profile.distance.nil? + data << content_tag('strong', _('Distance: ')) + "%.2f%" % profile.distance + '
' + end content_tag('table', content_tag('tr', content_tag('td', content_tag('div', profile_image(profile, :thumb), :class => 'profile-info-picture')) + -- libgit2 0.21.2