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]) { %}' +
|
|
|
|
'<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">' +
|
|
|
|
'<div class="ss-uploadfield-item-preview preview"><span>' +
|
|
|
|
'<img src="{%=file.thumbnail_url%}" alt="" />' +
|
|
|
|
'</span></div>' +
|
|
|
|
'<div class="ss-uploadfield-item-info">' +
|
|
|
|
'<label class="ss-uploadfield-item-name">' +
|
2012-05-11 04:43:17 +02:00
|
|
|
'<span class="name" title="{%=file.name%}">{%=file.name%}</span> ' +
|
2012-05-10 02:58:05 +02:00
|
|
|
'{% if (!file.error) { %}' +
|
2012-05-16 08:10:12 +02: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 { %}' +
|
2012-05-16 08:10:12 +02: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>' +
|
2012-02-03 00:59:40 +01:00
|
|
|
'{% } %}' +
|
|
|
|
'<div class="clear"><!-- --></div>' +
|
|
|
|
'</label>' +
|
|
|
|
'{% if (file.error) { %}' +
|
|
|
|
'<div class="ss-uploadfield-item-actions">' +
|
|
|
|
'<div class="ss-uploadfield-item-cancel ss-uploadfield-item-cancelfailed"><button class="icon icon-16">' + ss.i18n._t('UploadField.CANCEL', 'Cancel') + '</button></div>' +
|
|
|
|
'</div>' +
|
|
|
|
'{% } else { %}' +
|
|
|
|
'<div class="ss-uploadfield-item-actions">{% print(file.buttons, true); %}</div>' +
|
|
|
|
'{% } %}' +
|
|
|
|
'</div>' +
|
|
|
|
'{% if (!file.error) { %}' +
|
|
|
|
'<div class="ss-uploadfield-item-editform loading"><iframe frameborder="0" src="{%=file.edit_url%}"></iframe></div>' +
|
|
|
|
'{% } %}' +
|
|
|
|
'</li>' +
|
|
|
|
'{% } %}'
|
|
|
|
);
|