fix controller (find and json output). Now attachments get listed (no preview though)

This commit is contained in:
Stella 2014-04-21 21:13:25 +03:00
parent bacae17b87
commit 5e881faef2
2 changed files with 19 additions and 17 deletions

View file

@ -23,7 +23,10 @@
%th
%b Public
%th
%th
%tbody.files
.row-fluid.fileupload-buttonbar
.btn.btn-success.fileinput-button
%span.glyphicon.glyphicon-icon-plus.icon-white
@ -60,16 +63,15 @@
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-upload fade">
<td class="preview"><span class="fade"></span></td>
<td class="name"><span>{%=file.name%}</span></td>
<td class="name"><span>{%=file.name%}</span>
<div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
</td>
<td class="name"><input type="text" name="title[]" value="{%=file.name%}"/></td>
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
<td class="name"><input checked type="checkbox" name="public">Public</input></td>
{% if (file.error) { %}
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
<td class="error"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
{% } else if (o.files.valid && !i) { %}
<td>
<div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
</td>
<td class="start">{% if (!o.options.autoUpload) { %}
<button class="btn btn-primary">
<span class="glyphicon glyphicon-upload"></span>
@ -77,7 +79,7 @@
</button>
{% } %}</td>
{% } else { %}
<td colspan="2"></td>
<td></td>
{% } %}
<td class="cancel">{% if (!i) { %}
<button class="btn btn-warning">
@ -107,9 +109,8 @@
<td>{%=file.title%}</td>
<td class="size">{%=o.formatFileSize(file.size)%}</td>
<td>{%=file.public%}</td>
<td colspan="2"></td>
{% } %}
<td class="delete">
<td class="delete" colspan="2">
<button class="btn btn-danger pull-right" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
<span class="glyphicon glyphicon-trash"></i>
<span>{%=locale.fileupload.destroy%}</span>