X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcoord-links.html;h=6b91a26e8b5ba36038f1ed66881bb557cce73b50;hb=d5cdad7fae9c5e45701a7e83abeb903d31b7983f;hp=907e5f04a0e15fdd2114dbb0b7fd430c03555722;hpb=2bfe8d56f1dbf342cb5fac8187953cdb08b9d4cd;p=freeside.git 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, + &> +% } + <% mt('earth') |h %> <%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); +}