This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / httemplate / view / cust_main / packages / services.html
index f46afb9..6e30922 100644 (file)
@@ -20,7 +20,7 @@
       <TR>
         <TD ALIGN="right" COLSPAN="3" VALIGN="top" STYLE="padding-bottom:1px;padding-top:0px"><FONT SIZE="-2" COLOR="#FFD000">
 
-            <% $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) : '' %>
           </FONT></TD>
       </TR>
 
 %                 )
 %         ) { 
             (&nbsp;<%svc_recharge_link($cust_svc)%>&nbsp;)
-%         } 
+%         }
           </FONT></TD>
 
-          <TD ALIGN="right" VALIGN="top" STYLE="padding-bottom:5px;padding-top:0px"><FONT SIZE="-2">
+          <TD ALIGN="right" VALIGN="top" STYLE="padding-bottom:5px;padding-top:0px">
 
-%         if ( $curuser->access_right('Unprovision customer service') ) { 
-            (&nbsp;<%svc_unprovision_link($cust_svc)%>&nbsp;)
-%         } 
-          </FONT></TD>
+%           my $ip_addr = $cust_svc->svc_x->ip_addr;
+
+%           if ( $part_svc->svcdb eq 'svc_broadband' ) {
+              <FONT SIZE="-1" STYLE="float:left">(&nbsp;<% include('/elements/popup_link-ping.html', 'ip'=> $ip_addr ) %>&nbsp;)</FONT>
+
+%           }
+
+%           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"));
+              <FONT SIZE="-1" STYLE="float:left">(&nbsp;<A HREF="<% $svc_manage_link %>">Manage Device</A>&nbsp;)</FONT>
+
+%           }
+
+%           if ( $curuser->access_right('Unprovision customer service') ) { 
+              <FONT SIZE="-2">(&nbsp;<%svc_unprovision_link($cust_svc)%>&nbsp;)</FONT>
+%           } 
+
+%           if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ){
+              <FONT SIZE="-2">(&nbsp;<A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $cust_pkg->custnum.'+'.$cust_svc->svcnum %>">Test maestro status</A>&nbsp;)</FONT>
+%           } 
+
+          </TD>
         </TR>
 %   } 
 
@@ -55,7 +74,7 @@
 
       <TR>
         <TD COLSPAN=3 ALIGN="center" STYLE="padding-bottom:4px;padding-top:0px">
-          <B><% svc_provision_link($cust_pkg, $part_svc, $conf, $curuser) %></B>
+          <B><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %></B>
         </TD>
       </TR>
 
@@ -74,17 +93,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+/&nbsp;/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 +119,7 @@ sub svc_provision_link {
 
   my $link = qq!<A CLASS="provision" HREF="$url">!.
              "Provision&nbsp;$svc_nbsp&nbsp;($num_avail)</A>";
-  if ( $conf->exists('legacy_link')
+  if ( $opt->{'legacy_link'}
        && $curuser->access_right('View/link unlinked services')
      )
   {