[% callback="contact.pl?__action=get&entity_class=" _
credit_act.entity_class _ "&entity_id=" _ entity_id _
"&credit_id=" _ credit_act.id;
columns = [{ col_id = 'file_name', name = text('File name'), #'
type = 'href', href_base="file.pl&__action=get"}
{ col_id = 'mime_type', name = text('File Type'), #'
type = 'text'}
{ col_id = 'uploaded_at', name = text('Attached At'), #'
type = 'text'}
{ col_id = 'uploaded_by_name', name = text('Attached By'), #'
type = 'text'}]; %]
[% text('Files attached to Entity') %]
[%
FOREACH COL IN columns;
IF COL.col_id == 'file_name';
COL.href_base='file.pl?__action=get&file_class=4&id=';
COL.href_target='_download';
END;
END;
FOREACH ROW IN entity_files;
ROW.row_id = ROW.id;
END;
INCLUDE dynatable
columns = columns
attributes = {id = 'entity-files', width = '100%'}
tbody = {rows = entity_files };
%]
[% IF credit_act.id %]
[% text('Files attached to Credit Account') %]
[%
FOREACH COL IN columns;
IF COL.col_id == 'file_name';
COL.href_base='file.pl?__action=get&file_class=5&id=';
END;
END;
FOREACH ROW IN eca_files;
ROW.row_id = ROW.id;
END;
INCLUDE dynatable
columns = columns
attributes = {id = 'eca-files', width = '100%'}
tbody = {rows = eca_files };
END;
%]
[[% text('Attach to Entity') %]]
[% IF credit_act.id %]
[[% text('Attach to Credit Account') %]]
[% END %]