X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fattachments.html;h=d51d826453cb6ff153dbe69d8ee7c6667709b7f8;hb=1ea34a10ac52048e196041de7793c82500335db0;hp=53635fd6269385ba41c7d16122308dc7a885b959;hpb=ae898cc8e6de40fbecb30c973f91cd955434b159;p=freeside.git
diff --git a/httemplate/view/cust_main/attachments.html b/httemplate/view/cust_main/attachments.html
index 53635fd62..d51d82645 100755
--- a/httemplate/view/cust_main/attachments.html
+++ b/httemplate/view/cust_main/attachments.html
@@ -1,18 +1,19 @@
% if ( scalar(@attachments) ) {
- <% include('/elements/init_overlib.html') %>
+ <& /elements/init_overlib.html &>
- <% include("/elements/table-grid.html") %>
+ <& /elements/table-grid.html &>
<% note_datestr($attach,$conf,$bgcolor) %>
- <% $attach->otaker%>
+ <% $attach->usernum ? $attach->access_user->name : $attach->otaker %>
|
- <% $attach->filename %>
+ <% $attach->filename |h %>
|
- <% $attach->mime_type %>
+ <% $attach->title |h %>
+ |
+ <% $attach->mime_type |h %>
|
<% size_units( $attach->size ) %>
@@ -105,7 +110,7 @@
my $conf = new FS::Conf;
my $curuser = $FS::CurrentUser::CurrentUser;
-
+die "access denied" if !$curuser->access_right('View attachments');
my(%opt) = @_;
my $custnum = $opt{'custnum'};
@@ -127,6 +132,11 @@ sub note_datestr {
$strip;
}
+sub linkstr {
+ my ($clickjs, $label) = (shift,shift);
+ ' (' . emt($label) . ')';
+}
+
sub size_units {
my $bytes = shift;
return $bytes if $bytes < 1024;
@@ -135,15 +145,16 @@ sub size_units {
}
sub popup {
- my ($url, $label) = @_;
+ my ($url, $label, $confirm) = @_;
my $onclick =
include('/elements/popup_link_onclick.html',
'action' => popurl(2).$url,
'actionlabel' => $label,
- 'width' => 616,
- 'height' => 408,
+ 'width' => 510,
+ 'height' => 315,
'frame' => 'top',
);
+ $onclick = qq!if(confirm('$confirm')) { $onclick }! if $confirm;
return qq!onclick="$onclick"!;
}
|