'manage_link' => '', #for svc_broadband
'manage_link_text' => '', #default 'Manage Device'
'manage_link_loc' => '', #default 'bottom', or 'right'
- 'maestro-status_test' => '',
)
%>
</%doc>
<TR>
- <TD ALIGN="right" VALIGN="top"><%
-FS::UI::Web::svc_link($m, $part_svc, $cust_svc)
-%></TD>
- <TD STYLE="padding-bottom:0px"><B><%
-FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc)
-%></B></TD>
+ <TD ALIGN="right" VALIGN="top">
+% if ( $opt{no_links} ) {
+ <% $part_svc->svc |h %>:
+% } else {
+ <% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %>
+% }
+ </TD>
+ <TD STYLE="padding-bottom:0px" VALIGN="top">
+% if ( $opt{before_svc_callback} ) {
+ <% &{ $opt{before_svc_callback} }( $cust_svc ) %>
+% }
+ <B><% $cust_svc->agent_svcid ? $cust_svc->agent_svcid.': ' : '' %>
+% if ( $opt{no_links} ) {
+ <% ($cust_svc->label)[1] |h %>
+% } else {
+ <% FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc) %>
+% }
+ </B>
+% if ($part_svc->svcdb eq 'svc_circuit') {
+% my $provider = qsearchs('circuit_provider', { 'providernum' => $svc_x->providernum });
+% my $ctype = qsearchs('circuit_type', { 'typenum' => $svc_x->typenum });
+% if ($provider) {
+ <BR>Provider: <% $provider->provider %>
+% }
+% if ($ctype) {
+ <BR>Type: <% $ctype->typename %>
+% }
+% }
+% if ( $opt{after_svc_callback} ) {
+ <% &{ $opt{after_svc_callback} }( $cust_svc ) %>
+% }
+ </TD>
<TD ALIGN="right"><% FS::UI::Web::svc_export_links($m, $part_svc, $cust_svc) %>
-% if ( $manage_link and $opt{'manage_link_loc'} eq 'right' ) {
- <A HREF="<% $manage_link %>"><% $opt{'manage_link_text'} |h %></A>
+% if ( $opt{'manage_link_loc'} eq 'right' && ! $opt{no_links} ) {
+<& /elements/manage_device_link.html,
+ 'svc' => $svc_x,
+ 'part_svc' => $opt{'part_svc'} || $cust_svc->part_svc,
+ 'manage_link' => $opt{'manage_link'},
+ 'manage_link_text' => $opt{'manage_link_text'},
+ 'manage_link-new_window' => $opt{'manage_link-new_window'}
+&>
% }
</TD>
</TR>
</TR>
% }
<TR>
-% # first column: recharge link
+% # first column: (optional external balance and) recharge link
<TD ALIGN="right" VALIGN="top" STYLE="padding-bottom:5px; padding-top:0px">
+% if ( $part_svc->svcdb eq 'svc_phone'
+% && ! $opt{no_links}
+% )
+% {
+% my( $html, $hashref ) = $svc_x->export_getstatus;
+% if ( length($hashref->{'Balance'}) ) { #quelle hack
+ <FONT SIZE="-1">Balance: <b><% $hashref->{'Balance'} %></b> </FONT>
+% }
+% }
% if ( $curuser->access_right('Recharge customer service')
% && $part_svc->svcdb eq 'svc_acct'
+% && ! $opt{no_links}
% && ( $svc_x->seconds ne ''
% || $svc_x->upbytes ne ''
% || $svc_x->downbytes ne ''
</TD>
% # second column: all other action links
<TD ALIGN="right" VALIGN="top" STYLE="padding-bottom:5px; padding-top:0px">
-% if ( $part_svc->svcdb eq 'svc_broadband' ) {
+% if ( $part_svc->svcdb eq 'svc_broadband' && ! $opt{no_links} ) {
<FONT SIZE="-2">( <%
include('/elements/popup_link-ping.html',
'ip' => $svc_x->ip_addr
) %> )</FONT>
-% if ( $manage_link and $opt{'manage_link_loc'} eq 'bottom' ) {
- <FONT SIZE="-2">( <A HREF="<% $manage_link %>"><% $opt{'manage_link_text'} |h %></A> )</FONT>
+% if ( $opt{'manage_link_loc'} eq 'bottom' && ! $opt{no_links} ) {
+<& /elements/manage_device_link.html,
+ 'svc' => $svc_x,
+ 'part_svc' => $opt{'part_svc'} || $cust_svc->part_svc,
+ 'manage_link' => $opt{'manage_link'},
+ 'manage_link_text' => $opt{'manage_link_text'},
+ 'manage_link-new_window' => $opt{'manage_link-new_window'},
+ 'prepend' => '<FONT SIZE="-2">( ',
+ 'append' => ' )</FONT>'
+&>
% }
% } #svc_broadband
-% if ( $curuser->access_right('Unprovision customer service') ) {
+% if ( $curuser->access_right('Unprovision customer service') && ! $opt{no_links} ) {
<FONT SIZE="-2">( <% $svc_unprovision_link %> )</FONT>
-% }
-% if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ) {
- <FONT SIZE="-2">( <A HREF="<%$p%>misc/maestro-customer_status-test.html?<% $cust_pkg->custnum.'+'.$cust_svc->svcnum %>">Test maestro status</A> )
- </FONT>
% }
</TD>
</TR>
$cust_svc->svcnum .
qq!', '!.emt('Permanently unprovision and delete this service?').qq!')">!.emt('Unprovision').'</A>';
-my $manage_link = $opt{'manage_link'};
-if ( $part_svc->svcdb eq 'svc_broadband' and $manage_link ) {
- my $ip_addr = $svc_x->ip_addr; #substitution for $manage_link
- $manage_link = eval(qq("$manage_link"));
- $opt{'manage_link_text'} ||= mt('Manage Device');
- $opt{'manage_link_loc'} ||= 'bottom';
-}
-else {
- $manage_link = '';
-}
+$opt{'manage_link_loc'} ||= 'bottom';
</%init>