X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Felements%2Ftr-cust_svc_cancel.html;h=52dedd6c8635e1173f28aeb1e3512bf565402cb8;hb=560af69840e7e3fcebf65d5d56ca4efc0851efec;hp=e7fa47a92b554258036f9ad4cd918542341f4f37;hpb=b65b8096089410001dfbcd35f9a56f9405b9f5f1;p=freeside.git
diff --git a/httemplate/elements/tr-cust_svc_cancel.html b/httemplate/elements/tr-cust_svc_cancel.html
index e7fa47a92..52dedd6c8 100644
--- a/httemplate/elements/tr-cust_svc_cancel.html
+++ b/httemplate/elements/tr-cust_svc_cancel.html
@@ -3,14 +3,29 @@ tr-cust_svc_cancel - Short display of a canceled customer service
for use in view/cust_main.
%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{no_links} ) {
+ <% ($cust_svc->label)[1] |h %>
+% } else {
+ <% FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc) %>
+% }
+ |
-%# no action links, the service is canceled
+%# no action links except unprovision, the service is canceled
+% if ( $curuser->access_right('Unprovision customer service') && ! $opt{no_links} ) {
+
+
+ ( <% $svc_unprovision_link %> )
+ |
+
+% }
<%init>
my %opt = @_;
@@ -21,4 +36,9 @@ my $part_svc = $opt{'part_svc'} || $cust_svc->part_svc;
my $cust_pkg = $opt{'cust_pkg'} || $cust_svc->cust_pkg;
my $svc_x = $cust_svc->svc_x;
+my $svc_unprovision_link =
+ qq!!.emt('Unprovision').'';
+
%init>