summaryrefslogtreecommitdiff
path: root/httemplate/elements/coord-links.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/coord-links.html')
-rw-r--r--httemplate/elements/coord-links.html18
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>