mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
81 lines
3.7 KiB
HTML
81 lines
3.7 KiB
HTML
{extend name='main'}
|
|
|
|
{block name="button"}
|
|
|
|
<!--{if auth("admin/menu/add")}-->
|
|
<button data-modal='{:url("add")}' data-title="添加菜单" class='layui-btn layui-btn-sm layui-btn-primary'>添加菜单</button>
|
|
<!--{/if}-->
|
|
|
|
<!--{if auth("admin/menu/del")}-->
|
|
<button data-action='{:url("del")}' data-csrf="{:systoken('admin/menu/del')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除菜单</button>
|
|
<!--{/if}-->
|
|
|
|
{/block}
|
|
|
|
{block name="content"}
|
|
<div style="background:#fff">
|
|
<!--{empty name='list'}-->
|
|
<blockquote class="layui-elem-quote">没 有 记 录 哦!</blockquote>
|
|
<!--{else}-->
|
|
<table class="layui-table" lay-skin="line">
|
|
<thead>
|
|
<tr>
|
|
<th class='list-table-check-td think-checkbox'>
|
|
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
|
</th>
|
|
<th class='list-table-sort-td'>
|
|
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
|
|
</th>
|
|
<th class='text-center' style="width:30px"></th>
|
|
<th style="width:180px"></th>
|
|
<th class='layui-hide-xs' style="width:180px"></th>
|
|
<th colspan="2"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!--{foreach $list as $key=>$vo}-->
|
|
<tr data-dbclick>
|
|
<td class='list-table-check-td think-checkbox'>
|
|
<input class="list-check-box" value='{$vo.ids}' type='checkbox'>
|
|
</td>
|
|
<td class='list-table-sort-td'>
|
|
<input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
|
|
</td>
|
|
<td class='text-center'><i class="{$vo.icon} font-s18"></i></td>
|
|
<td class="nowrap"><span class="color-desc">{$vo.spl|raw}</span>{$vo.title}</td>
|
|
<td class='layui-hide-xs'>{$vo.url}</td>
|
|
<td class='text-center nowrap'>{eq name='vo.status' value='0'}<span class="color-red">已禁用</span>{else}<span class="color-green">使用中</span>{/eq}</td>
|
|
<td class='text-center nowrap notselect'>
|
|
|
|
{if auth("admin/menu/add")}
|
|
<span class="text-explode">|</span>
|
|
<!--{if $vo.spt<2}-->
|
|
<a class="layui-btn layui-btn-xs layui-btn-primary" data-tips-text="添加子菜单" data-modal='{:url("add")}?pid={$vo.id}'>添 加</a>
|
|
<!--{else}-->
|
|
<a class="layui-btn layui-btn-xs layui-btn-disabled">添 加</a>
|
|
<!--{/if}-->
|
|
{/if}
|
|
|
|
{if auth("admin/menu/edit")}
|
|
<a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑菜单" data-modal='{:url("admin/menu/edit")}?id={$vo.id}'>编 辑</a>
|
|
{/if}
|
|
|
|
{if $vo.status eq 1 and auth("admin/menu/forbid")}
|
|
<a class="layui-btn layui-btn-warm layui-btn-xs" data-action="{:url('forbid')}" data-value="id#{$vo.ids};status#0" data-csrf="{:systoken('admin/menu/forbid')}">禁 用</a>
|
|
{elseif auth("admin/menu/resume")}
|
|
<a class="layui-btn layui-btn-warm layui-btn-xs" data-action="{:url('resume')}" data-value="id#{$vo.ids};status#1" data-csrf="{:systoken('admin/menu/resume')}">启 用</a>
|
|
{/if}
|
|
|
|
{if auth("admin/menu/del")}
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.ids}" data-csrf="{:systoken('admin/menu/del')}">删 除</a>
|
|
{/if}
|
|
|
|
</td>
|
|
</tr>
|
|
<!--{/foreach}-->
|
|
</tbody>
|
|
</table>
|
|
<!--{/empty}-->
|
|
</div>
|
|
{/block}
|