{volist name="data" id="v"}

<div class="p-div" style="text-indent:{$depth * 1}em;" onclick="itemsClick('{$v.id}')">
      -|  {$v.title}
</div>
<!--<tr>-->
<!--    <td style="text-indent:{$depth * 2}em;>-->
<!--        {if condition="isset($v['children']) && !empty($v['children'])"}-->
<!--        <i class="glyphicon glyphicon-folder-open"></i>-->
<!--        {else /}-->
<!--        <i class="glyphicon glyphicon-list-alt"></i>-->
<!--        {/if}-->
<!--        {$v.title}-->
<!--    </td>-->
<!--</tr>-->
{if condition="isset($v['children']) && !empty($v['children'])"}
{:widget_view('asset_items/tree',['data'=>$v['children'],'depth'=>$depth + 1])}
{/if}
{/volist}

<script>
    function itemsClick(cateId){
        var url = "{:url('AssetItems/index')}?cateId="+cateId;
        window.location.href = url;
    }
</script>