X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Felements%2Fsvc_edit_link.html;h=5438ed2668898bea2e7a3b0eb92539f83d847426;hb=cb7ff9f91771b63d712493d966de041d857e83e7;hp=a85d380778518487d2dddcf99c81d8a80e2684c8;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git
diff --git a/httemplate/view/elements/svc_edit_link.html b/httemplate/view/elements/svc_edit_link.html
index a85d38077..5438ed266 100644
--- a/httemplate/view/elements/svc_edit_link.html
+++ b/httemplate/view/elements/svc_edit_link.html
@@ -1,24 +1,28 @@
% if ( $cancel_date ) {
-Canceled <% time2str('%b %o %Y', $cancel_date) %>
+<% mt("Canceled [_1]", time2str('%b %o %Y', $cancel_date) ) |h %>
% } else {
-Edit this <% $label %> |
-
-Unprovision this Service
+% if ( $curuser->access_right('Provision customer service') ) {
+| <% mt("Edit this [_1]", $label) |h %>
+% }
+% if ( $curuser->access_right('Unprovision customer service') ) {
+| <% mt('Unprovision this Service') |h %>
+% }
% }
<%init>
my %opt = @_;
my $svc_x = $opt{'svc'} or die "'svc' required";
my $svcdb = $opt{'table'} || $svc_x->table;
-my $edit_url = $opt{'edit_url'} ||
- $p . 'edit/' . $svcdb . '.cgi?' . $svc_x->svcnum;
+my $edit_url = ($opt{'edit_url'} ||
+ $p . 'edit/' . $svcdb . '.cgi?' ). $svc_x->svcnum;
my $cancel_url = $p . 'misc/unprovision.cgi?' . $svc_x->svcnum;
my $cust_svc = $svc_x->cust_svc; # always exists
my $cancel_date = $cust_svc->pkg_cancel_date;
my ($label) = $cust_svc->label;
+my $curuser = $FS::CurrentUser::CurrentUser;
%init>