[% BLOCK attachments %] [% IF attachments.files && attachments.files.size > 0 -%] [% FOREACH file IN attachments.files %] [% END # FOREACH %] [% END # IF attachments.files.size > 0 %]
[% text('Attached and Linked Files') %]
[% text('File name') %] [% text('File type') %] [% text('Attached at') %] [% text('Attached by') %]
[% file.file_name %] [% file.mime_type %] [% file.uploaded_at %] [% file.uploaded_by_name %]
[% IF attachments.file_links && attachments.file_links.size > 0 -%] [% FOREACH link IN attachments.file_links; aclass=" "; IF link.src_class() == 1; aclass="Transaction"; ELSIF link.src_class() == 2; aclass="Order"; END; %] [% END # FOREACH %]
[% text('File name') %] [% text('File type') %] [% text('Attached To Type') %] [% text('Attached To') %] [% text('Attached at') %] [% text('Attached by') %]
[% file.file_name %] [% file.mime_type %] [% aclass %] [% file.reference() %] [% file.attached_at() %] [% file.attached_by() %]
[% END # IF attachments.file_links.size > 0 -%] [[% text('Attach') %]] [% END; # block attachments %]