3 #For including the "Manage Device" link for broadband svc
4 # Handles check if svcdb is svc_broadband, ip_addr/mac_addr substitution
5 # and manage_link-new_window, but manage_link_loc and no_links must
6 # be checked as appropriate before including this
10 <& /elements/manage_device_link.html,
12 'part_svc' => $part_svc,
13 'manage_link' => scalar($conf->config('svc_broadband-manage_link')),
14 'manage_link_text' => scalar($conf->config('svc_broadband-manage_link_text')),
15 'manage_link-new_window' => $conf->exists('svc_broadband-manage_link-new_window'),
22 <% $startdec %><A HREF="<% $manage_link %>"<% $manage_target %>><% $manage_link_text |h %></A><% $enddec %>
28 my $manage_link_text = '';
29 my $manage_target = '';
33 if ( $opt{'part_svc'} and $opt{'svc'} and $opt{'manage_link'} and $opt{'part_svc'}->svcdb eq 'svc_broadband' ) {
34 my $ip_addr = $opt{'svc'}->ip_addr || ''; #substitution for $manage_link
35 my $mac_addr = $opt{'svc'}->mac_addr || ''; # ditto
36 $manage_link = $opt{'manage_link'};
37 $manage_link =~ s/\$ip_addr/$ip_addr/g; #safer than using eval
38 $manage_link =~ s/\$mac_addr/$mac_addr/g; # ditto
39 $manage_link_text = $opt{'manage_link_text'} || mt('Manage Device');
40 $manage_target = ' target="_blank"' if $opt{'manage_link-new_window'};
41 $startdec = $opt{'prepend'};
42 $enddec = $opt{'append'};