X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-cust_svc.html;h=cc5ec0f502e3453fe38b9cdf0fd4e65d6d46936f;hb=ce89af6a65868fd0f5cde05ef866611aacad39aa;hp=b66654f383bb2a4188f1379dadf43900056e0acf;hpb=f3e0ac2b009c4edd5692cb587ff709dac2223ebe;p=freeside.git diff --git a/httemplate/elements/tr-cust_svc.html b/httemplate/elements/tr-cust_svc.html index b66654f38..cc5ec0f50 100644 --- a/httemplate/elements/tr-cust_svc.html +++ b/httemplate/elements/tr-cust_svc.html @@ -15,20 +15,35 @@ Usage: 'manage_link' => '', #for svc_broadband 'manage_link_text' => '', #default 'Manage Device' 'manage_link_loc' => '', #default 'bottom', or 'right' - 'maestro-status_test' => '', ) %> - <% -FS::UI::Web::svc_link($m, $part_svc, $cust_svc) -%> - <% $cust_svc->agent_svcid ? $cust_svc->agent_svcid.': ' : '' %><% -FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc) -%> + +% if ( $opt{no_links} ) { + <% $part_svc->svc |h %>: +% } else { + <% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %> +% } + + +% if ( $opt{before_svc_callback} ) { + <% &{ $opt{before_svc_callback} }( $cust_svc ) %> +% } + <% $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) %> +% } + +% if ( $opt{after_svc_callback} ) { + <% &{ $opt{after_svc_callback} }( $cust_svc ) %> +% } + <% FS::UI::Web::svc_export_links($m, $part_svc, $cust_svc) %> -% if ( $manage_link and $opt{'manage_link_loc'} eq 'right' ) { +% if ( $manage_link and $opt{'manage_link_loc'} eq 'right' && ! $opt{no_links} ) { ><% $opt{'manage_link_text'} |h %> % } @@ -45,10 +60,20 @@ $cust_svc->overlimit ) % } -% # first column: recharge link +% # first column: (optional external balance and) recharge link +% if ( $part_svc->svcdb eq 'svc_phone' +% && ! $opt{no_links} +% ) +% { +% my( $html, $hashref ) = $svc_x->export_getstatus; +% if ( length($hashref->{'Balance'}) ) { #quelle hack + Balance: <% $hashref->{'Balance'} %>  +% } +% } % 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 '' @@ -60,22 +85,18 @@ $cust_svc->overlimit ) % # second column: all other action links -% if ( $part_svc->svcdb eq 'svc_broadband' ) { +% if ( $part_svc->svcdb eq 'svc_broadband' && ! $opt{no_links} ) { ( <% include('/elements/popup_link-ping.html', 'ip' => $svc_x->ip_addr ) %> ) -% if ( $manage_link and $opt{'manage_link_loc'} eq 'bottom' ) { +% if ( $manage_link and $opt{'manage_link_loc'} eq 'bottom' && ! $opt{no_links} ) { ><% $opt{'manage_link_text'} |h %> ) % } % } #svc_broadband -% if ( $curuser->access_right('Unprovision customer service') ) { +% if ( $curuser->access_right('Unprovision customer service') && ! $opt{no_links} ) { ( <% $svc_unprovision_link %> ) % } -% if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ) { - Test maestro status ) - -% }