2012-02-03 00:59:40 +01:00
|
|
|
window.tmpl.cache['ss-uploadfield-downloadtemplate'] = tmpl(
|
|
|
|
'{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">' +
|
2013-08-20 17:51:32 +02:00
|
|
|
'{% if (file.thumbnail_url) { %}' +
|
|
|
|
'<div class="ss-uploadfield-item-preview preview"><span>' +
|
|
|
|
'<img src="{%=file.thumbnail_url%}" alt="" />' +
|
|
|
|
'</span></div>' +
|
|
|
|
'{% } %}' +
|
2012-02-03 00:59:40 +01:00
|
|
|
'<div class="ss-uploadfield-item-info">' +
|
2013-05-27 05:22:59 +02:00
|
|
|
'{% if (!file.error) { %}' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'<input type="hidden" name="{%=file.fieldname%}[Files][]" value="{%=file.id%}" />' +
|
|
|
|
'{% } %}' +
|
|
|
|
'<label class="ss-uploadfield-item-name">' +
|
|
|
|
'<span class="name" title="{%=file.name%}">{%=file.name%}</span> ' +
|
2013-05-27 05:22:59 +02:00
|
|
|
'<span class="size">{%=o.formatFileSize(file.size)%}</span>' +
|
2012-05-10 02:58:05 +02:00
|
|
|
'{% if (!file.error) { %}' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'<div class="ss-uploadfield-item-status ui-state-success-text" title="'+ss.i18n._t('UploadField.Uploaded', 'Uploaded')+'">'+ss.i18n._t('UploadField.Uploaded', 'Uploaded')+'</div>' +
|
2012-05-10 02:58:05 +02:00
|
|
|
'{% } else { %}' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'<div class="ss-uploadfield-item-status ui-state-error-text" title="{%=o.options.errorMessages[file.error] || file.error%}">{%=o.options.errorMessages[file.error] || file.error%}</div>' +
|
|
|
|
'{% } %}' +
|
|
|
|
'<div class="clear"><!-- --></div>' +
|
2012-02-03 00:59:40 +01:00
|
|
|
'</label>' +
|
|
|
|
'{% if (file.error) { %}' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'<div class="ss-uploadfield-item-actions">' +
|
2015-10-05 17:26:21 +02:00
|
|
|
'<div class="ss-uploadfield-item-cancel ss-uploadfield-item-cancelfailed delete"><button type="button" class="icon icon-16" data-icon="delete" title="' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '">' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '</button></div>' +
|
2012-02-03 00:59:40 +01:00
|
|
|
'</div>' +
|
|
|
|
'{% } else { %}' +
|
|
|
|
'<div class="ss-uploadfield-item-actions">{% print(file.buttons, true); %}</div>' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'{% } %}' +
|
2012-02-03 00:59:40 +01:00
|
|
|
'</div>' +
|
|
|
|
'{% if (!file.error) { %}' +
|
2016-01-06 00:34:58 +01:00
|
|
|
'<div class="ss-uploadfield-item-editform"><iframe frameborder="0" data-src="{%=file.edit_url%}" src="about:blank"></iframe></div>' +
|
|
|
|
'{% } %}' +
|
|
|
|
'</li>' +
|
2012-02-03 00:59:40 +01:00
|
|
|
'{% } %}'
|
2013-05-27 05:22:59 +02:00
|
|
|
);
|