implement search on content loop.

This commit is contained in:
Manuel Raynaud
2014-06-05 13:24:53 +02:00
parent 57cf2d1a10
commit a4e28e5561
2 changed files with 63 additions and 2 deletions

View File

@@ -290,7 +290,7 @@
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" resource="admin.folder" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path='/admin/products/update' product_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path="/admin/folders/update/{$ID}"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
</td>
@@ -303,6 +303,49 @@
</div>
{* end folder search *}
{* content search *}
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Content'}
</caption>
<thead>
<tr>
<th>{intl l="ID"}</th>
<th></th>
<th>{intl l="Content title"}</th>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop type="content" name="content-search" visible="*" search_mode="sentence" search_term=trim($smarty.get.search_term) search_in="title"}
<tr>
<td>{$ID}</td>
<td></td>
<td class="object-title"><a href="{url path="/admin/content/update/{$ID}"}">{$TITLE}</a></td>
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" resource="admin.content" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path="/admin/content/update/{$ID}"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
{* end content search *}
</div>
</div>