File "admin-images.tmpl"
Full Path: /srv/www/www.cadoro.it/src/templates/admin-images.tmpl
File size: 2.58 KB
MIME-type: text/html
Charset: utf-8
<table class="table table-striped mt20"{if not $images} style="display: none"{/if}>
<tbody>
{foreach $images as $image}
<tr>
<td width="45%">
<a href="" class="handle"><i class="glyphicon glyphicon-move"></i></a>
<a href="{$base_url}/assets/{$image.asset}" rel="gallery">
{$image.name}
</a>
<input type="text" class="form-control mt10 mb10" name="images_title[]" value="{_a($image, 'title')}" placeholder="Titolo">
<input type="hidden" name="images_aviary[]" value="">
<img src="{$base_url}/assets/{$image.asset}" class="img-editable img-editable-noremove img-responsive" id="gallery-{$i+1}" style="max-width: 240px;">
</td>
<td width="15%" class="text-right">
<input type="hidden" name="images[]" value="{htmlentities(json_encode($image))}">
{round($image.size/1024)} kb
</td>
<td width="20%">
-
</td>
<td width="20%" class="text-right">
<a href="#" class="btn btn-default btn-xs btn-danger" data-behaviour="fileupload-remove">
<i class="glyphicon-remove glyphicon"></i> Rimuovi
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
<script type="text/html">
<tr>
<td width="45%">
<a href="" class="handle"><i class="glyphicon glyphicon-move"></i></a> <%= file.name %>
<input type="text" class="form-control mt10" name="images_title[]" value="" placeholder="Titolo">
</td>
<td width="15%" class="text-right">
<%= Math.round(file.size / 1024) || 1 %> kb
</td>
<td width="20%">
<% if (status == 0) { %>
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="bar" style="width:0%;"></div>
</div>
<% } else if (status == 1) { %>
<input type="hidden" name="images[]" value="<%= _.escape(result) %>">
<span class="label label-success">Completato</span>
<% } else if (status == 2) { %>
<span class="label">Annullato</span>
<% } else if (status == 3) { %>
<span class="label label-important">Errore</span>
<% } %>
</td>
<td width="20%" class="text-right">
<% if (status == 0) { %>
<a href="#" class="btn btn-default btn-xs btn-danger" data-behaviour="fileupload-cancel">
<i class="glyphicon-ban-circle glyphicon"></i> Annulla
</a>
<% } else { %>
<a href="#" class="btn btn-default btn-xs btn-danger" data-behaviour="fileupload-remove">
<i class="glyphicon-remove glyphicon"></i> Rimuovi
</a>
<% } %>
</td>
</tr>
</script>