implement seach on category loop.

This commit is contained in:
Manuel Raynaud
2014-06-05 13:12:04 +02:00
parent 86c34f589c
commit ac028a70b5
2 changed files with 57 additions and 1 deletions

View File

@@ -170,6 +170,44 @@
</div>
{* end order search *}
{* category 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='Category'}
</caption>
<thead>
<tr>
<th>{intl l="ID"}</th>
<th></th>
<th>{intl l="Category title"}</th>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop type="category" name="category-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/categories/update" category_id={$ID}}">{$TITLE}</a></td>
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" resource="admin.category" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path="/admin/categories/update" category_id={$ID}}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
{* end category search *}
{* product search *}
<div class="general-block-decorator">
<div class="table-responsive">