X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fservices.html;h=0fe7931d8a0cfeb64ac50bb81f049705d4d71311;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=f46afb9267f89b52ef1bf0c28c855fdeea0be638;hpb=2b8ffc98529637ffddfe7cbf6b4f9b8deb90f0fa;p=freeside.git diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index f46afb926..0fe7931d8 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -20,7 +20,7 @@ - <% $cust_svc->overlimit ? "Overlimit: ". time2str('%b %o %Y' . ($conf->exists('cust_pkg-display_times') ? ' %l:%M %P' : ''), $cust_svc->overlimit) : '' %> + <% $cust_svc->overlimit ? "Overlimit: ". time2str('%b %o %Y' . ($opt{'cust_pkg-display_times'} ? ' %l:%M %P' : ''), $cust_svc->overlimit) : '' %> @@ -36,15 +36,29 @@ % ) % ) { ( <%svc_recharge_link($cust_svc)%> ) -% } +% } - + -% if ( $curuser->access_right('Unprovision customer service') ) { - ( <%svc_unprovision_link($cust_svc)%> ) -% } - +% my $ip_addr = $cust_svc->svc_x->ip_addr; + +% if ( $part_svc->svcdb eq 'svc_broadband' ) { + ( <% include('/elements/popup_link-ping.html', 'ip'=> $ip_addr ) %> ) + +% } + +% my $manage_link = $opt{'svc_broadband-manage_link'}; +% if ( $manage_link && $part_svc->svcdb eq 'svc_broadband' ) { +% my $svc_manage_link = eval(qq("$manage_link")); + Manage Device ) + +% } + +% if ( $curuser->access_right('Unprovision customer service') ) { + ( <%svc_unprovision_link($cust_svc)%> ) +% } + % } @@ -55,7 +69,7 @@ - <% svc_provision_link($cust_pkg, $part_svc, $conf, $curuser) %> + <% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %> @@ -74,17 +88,18 @@ my $bgcolor = $opt{'bgcolor'}; my $cust_pkg = $opt{'cust_pkg'}; my $part_pkg = $opt{'part_pkg'}; my $curuser = $FS::CurrentUser::CurrentUser; -my $conf = new FS::Conf; + +my $conf = new FS::Conf; sub svc_provision_link { - my ($cust_pkg, $part_svc, $conf, $curuser) = @_; + my ($cust_pkg, $part_svc, $opt, $curuser) = @_; ( my $svc_nbsp = $part_svc->svc ) =~ s/\s+/ /g; my $num_avail = $part_svc->num_avail; my $pkgnum_svcpart = "pkgnum=". $cust_pkg->pkgnum. ';'. "svcpart=". $part_svc->svcpart; my $url; if ( $part_svc->svcdb eq 'svc_external' #could be generalized - && $conf->exists('svc_external-skip_manual') + && $opt->{'svc_external-skip_manual'} ) { $url = "${p}edit/process/". $part_svc->svcdb. ".cgi?$pkgnum_svcpart"; } else { @@ -99,7 +114,7 @@ sub svc_provision_link { my $link = qq!!. "Provision $svc_nbsp ($num_avail)"; - if ( $conf->exists('legacy_link') + if ( $opt->{'legacy_link'} && $curuser->access_right('View/link unlinked services') ) {