mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
77 lines
3.4 KiB
HTML
77 lines
3.4 KiB
HTML
{extend name='main'}
|
|
|
|
{block name="button"}
|
|
<!--{if auth("admin/auth/add")}-->
|
|
<button data-modal='{:url("add")}' data-title="添加权限" class='layui-btn layui-btn-sm layui-btn-primary'>添加权限</button>
|
|
<!--{/if}-->
|
|
|
|
<!--{if auth("admin/auth/remove")}-->
|
|
<button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('admin/auth/remove')}" data-confirm="确定要删除这些权限吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除权限</button>
|
|
<!--{/if}-->
|
|
{/block}
|
|
|
|
{block name="content"}
|
|
|
|
<div class="think-box-shadow">
|
|
|
|
<table class="layui-table" lay-skin="line">
|
|
<caption class="margin-bottom-10 text-left">{include file='auth/index_search'}</caption>
|
|
{notempty name='list'}
|
|
<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='text-left nowrap'>权限信息</th>
|
|
<th class='text-left nowrap'>创建时间</th>
|
|
<th class="text-center">状态</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
{/notempty}
|
|
<tbody>
|
|
{foreach $list as $key=>$vo}
|
|
<tr data-dbclick>
|
|
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
|
|
<td class='text-left'>
|
|
权限名称:{$vo.title|default='-'}<br>
|
|
权限描述:{$vo.desc|default="<span class='color-desc'>没有写描述哦!</span>"}
|
|
</td>
|
|
<td class="text-left nowrap">
|
|
日期:{$vo.create_at|format_datetime|str_replace=' ','<br>时间:',###|raw}
|
|
</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'>
|
|
|
|
{if auth("admin/auth/edit")}
|
|
<span class="text-explode">|</span>
|
|
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑权限" data-modal='{:url("admin/auth/edit")}?id={$vo.id}'>编 辑</a>
|
|
{/if}
|
|
|
|
{if auth("admin/auth/apply")}
|
|
<a class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("admin/auth/apply")}?id={$vo.id}'>授 权</a>
|
|
{/if}
|
|
|
|
{if $vo.status eq 1 and auth("admin/auth/forbid")}
|
|
<a class="layui-btn layui-btn-warm layui-btn-sm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('admin/auth/forbid')}">禁 用</a>
|
|
{elseif auth("admin/auth/resume")}
|
|
<a class="layui-btn layui-btn-warm layui-btn-sm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('admin/auth/resume')}">启 用</a>
|
|
{/if}
|
|
|
|
{if auth("admin/auth/remove")}
|
|
<a class="layui-btn layui-btn-danger layui-btn-sm" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('admin/auth/remove')}">删 除</a>
|
|
{/if}
|
|
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
|
|
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
|
|
|
</div>
|
|
|
|
{/block} |