projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
71873: GlobalVision - directions
[freeside.git]
/
httemplate
/
elements
/
coord-links.html
diff --git
a/httemplate/elements/coord-links.html
b/httemplate/elements/coord-links.html
index
45b8132
..
a755791
100644
(file)
--- a/
httemplate/elements/coord-links.html
+++ b/
httemplate/elements/coord-links.html
@@
-1,5
+1,7
@@
<& /elements/init_overlib.html &>
<& /elements/init_overlib.html &>
+% if ( $apikey ) {
+
<& /elements/popup_link.html,
'action' => $p. 'view/map.html?'. $query,
'label' => mt('map'),
<& /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>
<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/'$//;
$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} }
#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>
my $origin = uri_escape(join(',', @origin));
</%init>