X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-cust_svc.html;h=3710b27ffa0765a8a5e832d72e6f1aa8a54c6272;hb=d0fcbc3d04250ec54cb5dea7abcc58d1f45d78b1;hp=79a3b298c21c03be4d8cd6984281b2efc997b166;hpb=0301d1273aae53a35f428cff5a501849768befc8;p=freeside.git
diff --git a/httemplate/elements/tr-cust_svc.html b/httemplate/elements/tr-cust_svc.html
index 79a3b298c..3710b27ff 100644
--- a/httemplate/elements/tr-cust_svc.html
+++ b/httemplate/elements/tr-cust_svc.html
@@ -12,19 +12,41 @@ Usage:
'cust_pkg' => $cust_pkg,
#optional
'cust_pkg-display_times' => '', #bool
- 'svc_broadband-manage_link' => '',
- 'maestro-status_test' => '',
+ 'manage_link' => '', #for svc_broadband
+ 'manage_link_text' => '', #default 'Manage Device'
+ 'manage_link_loc' => '', #default 'bottom', or 'right'
)
%>
%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 ( $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{no_links} ) {
+ ><% $opt{'manage_link_text'} |h %>
+% }
+ |
% if ( $cust_svc->overlimit ) {
@@ -42,6 +64,7 @@ $cust_svc->overlimit )
% 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 ''
@@ -53,26 +76,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
) %> )
-% my $manage_link = $opt{'svc_broadband-manage_link'};
-% if ( $manage_link ) {
-% my $ip_addr = $svc_x->ip_addr; #substitution for $manage_link
- ( ">Manage Device )
+% 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 )
-
-% }
|
@@ -88,6 +103,20 @@ my $svc_x = $cust_svc->svc_x;
my $svc_unprovision_link =
qq!Unprovision!;
+ 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
+ my $mac_addr = $svc_x->mac_addr; # ditto
+ $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 = '';
+}
%init>