chaoyu/view/manager/rule/index.html

90 lines
4.5 KiB
HTML
Executable File

{layout name="manager/layout" /}
<div class="layui-card layui-col-md12">
<div class="layui-card-body">
<div class=" top-operate">
<a class="layui-btn layui-btn-normal" data-href="{:url('manager.rule/add')}" title="新增权限" >
<i class="layui-icon layui-icon-add-1"></i>新增权限
</a>
</div>
{empty name="items"}
无记录
{else /}
<table class="layui-table">
<colgroup>
<col width="300px">
<col>
<col width="410px">
</colgroup>
<thead>
<tr>
<td>栏目</td>
<td>路径</td>
<td>操作</td>
</tr>
</thead>
{foreach $items as $item}
<tbody class="table-lv1" data-id="{$item.id}" data-url="{:url('manager.rule/sort')}">
<tr>
<td>{$item.title}</td>
<td>{$item.name}</td>
<td >
<a data-href="{:url('manager.rule/add',['parent_id' => $item['id']])}" class="layui-btn layui-btn-primary layui-btn-xs" title="添加下级权限">
<i class=""></i>添加下级权限
</a>
<a class="sort layui-btn layui-btn-primary layui-btn-xs" data-id="{$item.id}" data-sort="up" data-url="{:url('manager.rule/sort')}" href="javascript:void(0);">
<i class=""></i>向上
</a>
<a class="sort layui-btn layui-btn-primary layui-btn-xs" data-id="{$item.id}" data-sort="down" data-url="{:url('manager.rule/sort')}" href="javascript:void(0);">
<i class=""></i>向下
</a>
<a data-href="{:url('manager.rule/edit',['id' => $item['id']])}" class="layui-btn layui-btn-warm layui-btn-xs" title="编辑">
<i class=""></i>编辑
</a>
<a class="del layui-btn layui-btn-danger layui-btn-xs" data-id="{$item.id}" data-url="{:url('manager.rule/del')}" href="javascript:void(0);" >
<i class=""></i>删除
</a>
</td>
</tr>
{if isset($item['children']) && !empty($item['children'])}
<tr>
<td colspan="3" style="padding: 0;">
<table class="layui-table layui-table-allnobrder" style="margin: auto;">
<colgroup>
<col width="300px">
<col>
<col width="410px">
</colgroup>
{foreach $item['children'] as $child}
<tr class="table-lv2" data-id="{$child['id']}" data-url="{:url('manager.rule/sort')}">
<td><img src="__MANAGER__/image/ico_arrow7.png" width="20px" style="margin:0 15px 0 25px;">{$child.title}</td>
<td>{$child.name}</td>
<td >
<a class="layui-btn layui-btn-primary layui-btn-xs" style="opacity:0; pointer-events: none;">
<i class=""></i>添加下级权限
</a>
<a class="sort layui-btn layui-btn-primary layui-btn-xs" data-id="{$child.id}" data-sort="up" data-url="{:url('manager.rule/sort')}" href="javascript:void(0);">
<i class=""></i>向上
</a>
<a class="sort layui-btn layui-btn-primary layui-btn-xs" data-id="{$child.id}" data-sort="down" data-url="{:url('manager.rule/sort')}" href="javascript:void(0);">
<i class=""></i>向下
</a>
<a class="layui-btn layui-btn-warm layui-btn-xs" data-href="{:url('manager.rule/edit',['id' => $child['id']])}" title="编辑">
<i class=""></i>编辑
</a>
<a class="del layui-btn layui-btn-danger layui-btn-xs" data-id="{$child.id}" data-url="{:url('manager.rule/del')}" href="javascript:void(0);">
<i class=""></i>删除
</a>
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/if}
</tbody>
{/foreach}
</table>
{/empty}
</div>
</div>