summaryrefslogtreecommitdiff
path: root/httemplate/elements/coord-links.html
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-09-23 19:00:29 -0500
committerJonathan Prykop <jonathan@freeside.biz>2016-09-23 19:00:29 -0500
commite1acfb2921b35fe097015208e8072a2675d01d69 (patch)
tree431c881402f5f20f600d0de981f914a83fdec74d /httemplate/elements/coord-links.html
parent495da424492b18c3f4cdaa3fccec728b14435fde (diff)
71873: GlobalVision - directions
Diffstat (limited to 'httemplate/elements/coord-links.html')
-rw-r--r--httemplate/elements/coord-links.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/httemplate/elements/coord-links.html b/httemplate/elements/coord-links.html
index 45b813201..a755791ae 100644
--- a/httemplate/elements/coord-links.html
+++ b/httemplate/elements/coord-links.html
@@ -1,5 +1,7 @@
<& /elements/init_overlib.html &>
+% if ( $apikey ) {
+
<& /elements/popup_link.html,
'action' => $p. 'view/map.html?'. $query,
'label' => mt('map'),
@@ -19,6 +21,8 @@
&>
% }
+% } # end if $apikey
+
<A HREF="<%$p%>view/kml.cgi?<% $query %>"><% mt('earth') |h %></A>
<%init>
@@ -45,10 +49,13 @@ $m->interp->apply_escapes($js_name, 'js_string');
$js_name =~ s/^'//;
$js_name =~ s/'$//;
+my $conf = new FS::Conf;
+my $apikey = $conf->config('google_maps_api_key');
+
#for directions link
my @origin = $opt{company_address}
? @{ $opt{company_address} }
- : FS::Conf->new->config('company_address', $agentnum);
+ : $conf->config('company_address', $agentnum);
my $origin = uri_escape(join(',', @origin));
</%init>