[freeside-devel] View Maps revised

Ivan Kohler ivan at freeside.biz
Sat Oct 4 17:22:03 PDT 2008


On Wed, Oct 01, 2008 at 06:00:09PM -0500, Jeremy Davis wrote:
> Needed to add a target so we didn't lose the current screen.  This is
> patched against HEAD.

Index: httemplate/view/cust_main/contacts.html
===================================================================
 
-<% $which{$which} %> address
+% my $google_maps = $cust_main->get("${pre}address1"). ",". $cust_main->get("${pre}city"). ",". $cust_main->get("${pre}zip"). ",". $cust_main->get("${pre}state");
+
+<% $which{$which} %> address (<a href="http://maps.google.com/?q=<% $google_maps %>" target="_blank">View Map)</a>

Should it be "city,state,zip", not "city,zip,state" ?  And perhaps we 
should add ','.$cust_main->country_full if ->country ne 'US', right?

And $google_maps should be URI escaped with uri_escape() before being 
used in the URL, don't you think?

-- 
_ivan


More information about the freeside-devel mailing list