Add basket
This commit is contained in:
@@ -1,31 +1,54 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Filename</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $parent}
|
||||
<tr>
|
||||
<td><a href="{$base_uri}list/source/{$source->name()}/{$parent_path}" title="Parent Directory">../ <em>Parent Directory</em></a></td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{foreach from=$files item=file}
|
||||
<tr>
|
||||
{if $file->isFile()}
|
||||
<td>{$file->basename()}</td>
|
||||
{else}
|
||||
<td><a href="{$base_uri}list/source/{$source->name()}/{$path}{$file->basename()}" title="{$file->basename()}">{$file->basename()}</a></td>
|
||||
{/if}
|
||||
<td>{if $file->isFile()}
|
||||
{$file->size()|formatFilesize}
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<form method="post" action="{$base_uri}basket/do/add-items/">
|
||||
<input type="hidden" name="redirect" value="list/source/{$source->name()|escape:html}/{$path|escape:html}" />
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input id="list_select_all" class="select_all" type="checkbox" />
|
||||
Add to Basket
|
||||
</th>
|
||||
<th>Filename</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $parent}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><a href="{$base_uri}list/source/{$source->name()|escape:html}/{$parent_path|escape:html}" title="Parent Directory">../ <em>Parent Directory</em></a></td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{foreach from=$files item=file}
|
||||
{assign var=item value="{$source->name()}:{$path}{$file->basename()}"}
|
||||
<tr>
|
||||
<td>
|
||||
{if $basket->contains($item)}
|
||||
<input type="checkbox" checked="checked" disabled="disabled" />
|
||||
{else}
|
||||
<input type="checkbox" class="list_select_all" name="items[]" value="{$item|escape:html}" />
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $file->isFile()}
|
||||
{$file->basename()|escape:html}
|
||||
{else}
|
||||
<a href="{$base_uri}list/source/{$source->name()|escape:html}/{$path|escape:html}{$file->basename()|escape:html}" title="{$file->basename()|escape:html}">{$file->basename()|escape:html}</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{*if $file->isFile()*}
|
||||
{$file->size()|formatFilesize|escape:html}
|
||||
{*else}
|
||||
-
|
||||
{/if*}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3"><input type="submit" class="btn primary" name="submit" value="Add to Basket" /></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
Reference in New Issue
Block a user