diff options
author | Mark Wells <mark@freeside.biz> | 2012-02-28 16:17:59 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-02-28 16:17:59 -0800 |
commit | d5cdad7fae9c5e45701a7e83abeb903d31b7983f (patch) | |
tree | 24b8a0915a5c7e613a5f117db24c6b5320bef2b4 /httemplate/elements/coord-links.html | |
parent | 2bfe8d56f1dbf342cb5fac8187953cdb08b9d4cd (diff) |
directions to customer address, #16585
Diffstat (limited to 'httemplate/elements/coord-links.html')
-rw-r--r-- | httemplate/elements/coord-links.html | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/httemplate/elements/coord-links.html b/httemplate/elements/coord-links.html index 907e5f04a..6b91a26e8 100644 --- a/httemplate/elements/coord-links.html +++ b/httemplate/elements/coord-links.html @@ -9,14 +9,30 @@ #'color' &> +% if ( $origin ) { + <& /elements/popup_link.html, + 'action' => $p. "view/directions.html?origin=$origin;". $query, + 'label' => mt('dir'), + 'actionlabel' => $name, + 'width' => 763, + 'height' => 575, + &> +% } + <A HREF="<%$p%>view/kml.cgi?<% $query %>"><% mt('earth') |h %></A> <%init> -my ($latitude, $longitude, $name) = @_; +my ($latitude, $longitude, $name, $agentnum) = @_; my $query = 'name='. uri_escape($name). ';lat='. $latitude. ';lon='. $longitude; +my $origin; +#for directions link +if ( $agentnum =~ /^\d+$/ ) { + $origin = FS::Conf->new->config('company_address', $agentnum); + $origin = uri_escape($origin); +} </%init> |