add "manage device" link & config, RT#5438
authorivan <ivan>
Wed, 20 May 2009 15:27:45 +0000 (15:27 +0000)
committerivan <ivan>
Wed, 20 May 2009 15:27:45 +0000 (15:27 +0000)
FS/FS/Conf.pm
httemplate/view/cust_main/packages.html

index e37c6ca..bcf7bba 100644 (file)
@@ -2464,6 +2464,13 @@ worry that config_items is freeside-specific and icky.
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'svc_broadband-manage_link',
+    'section'     => 'UI',
+    'description' => 'URL for svc_broadband "Manage Device" link.  The following substitutions are available: $ip_addr.',
+    'type'        => 'text',
+  },
+
 );
 
 1;
index 63e31dd..188bc9d 100755 (executable)
@@ -450,10 +450,17 @@ Current packages
 %         } 
           </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 ( $manage_link && $part_svc->svcdb eq 'svc_broadband' ) {
+%             my $ip_addr = $cust_svc->svc_x->ip_addr;
+%             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') ) { 
-            (&nbsp;<%svc_unprovision_link($cust_svc)%>&nbsp;)
+            <FONT SIZE="-2">(&nbsp;<%svc_unprovision_link($cust_svc)%>&nbsp;)</FONT>
 %         } 
           </FONT></TD>
         </TR>
@@ -497,6 +504,8 @@ my $packages = get_packages($cust_main, $conf);
 my $colspan = $conf->exists('cust_pkg-display_times') ? 8 : 4;
 my $width = $conf->exists('cust_pkg-display_times') ? '38%' : '56%';
 
+my $manage_link = $conf->config('svc_broadband-manage_link');
+
 sub pkg_status_row {
   my( $cust_pkg, $title, $field, %opt ) = @_;