X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-cust_svc.html;h=2d1a9e6a5ddd058dd8468128c7dd21e4c61af59c;hb=57ac39c47a28bcf9dc1f689e6bd6234f0218d0ad;hp=ca5de86b4d119b1644823d74d3ef9692e2256161;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git
diff --git a/httemplate/elements/tr-cust_svc.html b/httemplate/elements/tr-cust_svc.html
index ca5de86b4..2d1a9e6a5 100644
--- a/httemplate/elements/tr-cust_svc.html
+++ b/httemplate/elements/tr-cust_svc.html
@@ -15,21 +15,46 @@ Usage:
'manage_link' => '', #for svc_broadband
'manage_link_text' => '', #default 'Manage Device'
'manage_link_loc' => '', #default 'bottom', or 'right'
- 'maestro-status_test' => '',
)
%>
%doc>
- <%
-FS::UI::Web::svc_link($m, $part_svc, $cust_svc)
-%> |
- <%
-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 ($part_svc->svcdb eq 'svc_circuit') {
+ Provider: <% $svc_x->circuit_provider->provider %>
+ Type: <% $svc_x->circuit_type->typename %>
+% }
+% 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' ) {
- ><% $opt{'manage_link_text'} |h %>
+% 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'}
+&>
% }
|
@@ -45,10 +70,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,21 +95,25 @@ $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' ) {
- ( ><% $opt{'manage_link_text'} |h %> )
+% 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' => '( ',
+ 'append' => ' )'
+&>
% }
% } #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 )
-
% }
|
@@ -93,17 +132,6 @@ my $svc_unprovision_link =
$cust_svc->svcnum .
qq!', '!.emt('Permanently unprovision and delete this service?').qq!')">!.emt('Unprovision').'';
-my $manage_link = $opt{'manage_link'};
-my $manage_target = '';
-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';
- $manage_target = ' target="_blank"' if $opt{'manage_link-new_window'};
-}
-else {
- $manage_link = '';
-}
+$opt{'manage_link_loc'} ||= 'bottom';
%init>