X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-cust_svc.html;h=ca5de86b4d119b1644823d74d3ef9692e2256161;hb=ea3ce8d7f076e7fecff4be7ae63bc413adb0adf5;hp=e792ff350df20572b0e2c3b103cba27d974ece34;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git
diff --git a/httemplate/elements/tr-cust_svc.html b/httemplate/elements/tr-cust_svc.html
index e792ff350..ca5de86b4 100644
--- a/httemplate/elements/tr-cust_svc.html
+++ b/httemplate/elements/tr-cust_svc.html
@@ -1,8 +1,24 @@
<%doc>
tr-cust_svc - Short display of a customer service for use in view/cust_main.
-Formerly part of view/cust_main/packages/services.html, moved here for
-cleanliness.
+Formerly part of view/cust_main/packages/services.html
+
+Usage:
+
+ <% include('/elements/tr-cust_svc.html',
+ #required
+ 'part_svc' => $part_svc,
+ 'cust_svc' => $cust_svc,
+ 'cust_pkg' => $cust_pkg,
+ #optional
+ 'cust_pkg-display_times' => '', #bool
+ 'manage_link' => '', #for svc_broadband
+ 'manage_link_text' => '', #default 'Manage Device'
+ 'manage_link_loc' => '', #default 'bottom', or 'right'
+ 'maestro-status_test' => '',
+ )
+ %>
+
%doc>
<%
@@ -11,6 +27,11 @@ FS::UI::Web::svc_link($m, $part_svc, $cust_svc)
| <%
FS::UI::Web::svc_label_link($m, $part_svc, $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 ( $cust_svc->overlimit ) {
@@ -40,15 +61,12 @@ $cust_svc->overlimit )
% # second column: all other action links
% if ( $part_svc->svcdb eq 'svc_broadband' ) {
- ( <%
+ ( <%
include('/elements/popup_link-ping.html',
'ip' => $svc_x->ip_addr
) %> )
-% my $manage_link = $opt{'svc_broadband-manage_link'};
-% if ( $manage_link ) {
- ( ">Manage Device )
+% if ( $manage_link and $opt{'manage_link_loc'} eq 'bottom' ) {
+ ( ><% $opt{'manage_link_text'} |h %> )
% }
% } #svc_broadband
% if ( $curuser->access_right('Unprovision customer service') ) {
@@ -73,6 +91,19 @@ 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
+ $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>
|