tree.html 1.2 KB

12345678910111213141516171819202122232425
  1. {volist name="data" id="v"}
  2. <tr>
  3. <td style="text-indent:{$depth * 2}em;>
  4. {if condition="isset($v['children']) && !empty($v['children'])"}
  5. <i class="glyphicon glyphicon-folder-open"></i>
  6. {else /}
  7. <i class="glyphicon glyphicon-list-alt"></i>
  8. {/if}
  9. {$v.title}
  10. </td>
  11. <td style="width: 300px;">
  12. <a url="{:url('edit',['id'=>$v['id']])}" href="javascript:;" data-title="编辑" onclick="layer_open(this,2)" data-width="400px" data-height="300px"><span class="label label-primary" title="编辑" >编辑</span></a>
  13. <a url="{:url('add',['pid'=>$v['id']])}" href="javascript:;" data-title="添加子分类" onclick="layer_open(this,2)" data-width="400px" data-height="300px"><span class="label label-primary" title="添加子分类">添加子分类</span></a>
  14. <a href="{:url('del',['id'=>$v['id']])}" data-confirm="确定要删除该记录吗?" class="ajax-get confirm data-reload"><span class="label label-danger" title="删除">删除</span></a>
  15. </td>
  16. </tr>
  17. {if condition="isset($v['children']) && !empty($v['children'])"}
  18. {:widget_view('asset_cate/tree',['data'=>$v['children'],'depth'=>$depth + 1])}
  19. {/if}
  20. {/volist}