X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fattachments.html;h=d51d826453cb6ff153dbe69d8ee7c6667709b7f8;hb=c2f4d21edfe3434c02c9dbd666e684c2deb3258e;hp=bdd4f59170b57037da33df669f1147970f321ff0;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git diff --git a/httemplate/view/cust_main/attachments.html b/httemplate/view/cust_main/attachments.html index bdd4f5917..d51d82645 100755 --- a/httemplate/view/cust_main/attachments.html +++ b/httemplate/view/cust_main/attachments.html @@ -1,19 +1,19 @@ % if ( scalar(@attachments) ) { - <% include('/elements/init_overlib.html') %> + <& /elements/init_overlib.html &> - <% include("/elements/table-grid.html") %> + <& /elements/table-grid.html &> - Date + <% mt('Date') |h %> % if ( $conf->exists('cust_main_note-display_times') ) { - Time + <% mt('Time') |h %> % } - Person - Filename - Description - Type - Size + <% mt('Person') |h %> + <% mt('Filename') |h %> + <% mt('Description') |h %> + <% mt('Type') |h %> + <% mt('Size') |h %> @@ -48,34 +48,35 @@ % my $clickjs = popup('edit/process/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum;". % "undelete=1", -% 'Undelete attachment'); -% $edit .= qq!  (undelete)!; +% emt('Undelete attachment')); +% $edit .= linkstr($clickjs, emt('undelete')); % } % if ($curuser->access_right('Purge attachment')) { % my $clickjs = popup('edit/process/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum;". % "purge=1", -% 'Purge attachment', -% 'Permanently remove this file?'); -% $edit .= qq!  (purge)!; +% emt('Purge attachment'), +% emt('Permanently remove this file?') ); +% $edit .= linkstr($clickjs,emt('purge')); % } % } % else { # you can download or edit it % if ($curuser->access_right('Edit attachment') ) { % my $clickjs = popup('edit/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum", -% 'Edit attachment properties'); -% $edit .= qq!  (edit)!; +% emt('Edit attachment properties')); +% $edit .= linkstr($clickjs,emt('edit')); % } % if($curuser->access_right('Delete attachment') ) { % my $clickjs = popup('edit/process/cust_main_attach.cgi?'. % "custnum=$custnum;attachnum=$attachnum;delete=1", % 'Delete attachment', % 'Delete this file?'); -% $edit .= qq!  (delete)!; +% $edit .= linkstr($clickjs,emt('delete')); % } % if ($curuser->access_right('Download attachment') ) { -% $edit .= qq!  (download)!; +% $edit .= qq!  (! +% . emt('download') .')'; % } % } @@ -85,12 +86,12 @@  <% $attach->usernum ? $attach->access_user->name : $attach->otaker %> -  <% $attach->filename %> +  <% $attach->filename |h %> -  <% $attach->title %> +  <% $attach->title |h %> -  <% $attach->mime_type %> +  <% $attach->mime_type |h %>  <% size_units( $attach->size ) %> @@ -131,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;