修改模板代码

This commit is contained in:
Anyon 2020-07-22 14:46:58 +08:00
parent 4e8c9fad6e
commit 97625a076d
4 changed files with 21 additions and 28 deletions

View File

@ -3,13 +3,13 @@
<div class="layui-card-body padding-left-40">
<label class="layui-form-item relative block">
<span class="color-green font-w7">访问权限名称</span><span class="color-desc margin-left-5">Permission Name</span>
<span class="color-green font-w7">访问权限名称</span><span class="color-desc margin-left-5">PermissionName</span>
<input type="text" name="title" value='{$vo.title|default=""}' required placeholder="请输入访问权限名称" class="layui-input">
<span class="help-block">权限名称需要保持不重复,在给用户授权时需要根据名称选择!</span>
</label>
<label class="layui-form-item relative block">
<span class="color-green font-w7">访问权限描述</span><span class="color-desc margin-left-5">Permission Description</span>
<span class="color-green font-w7">访问权限描述</span><span class="color-desc margin-left-5">PermissionDescription</span>
<textarea placeholder="请输入访问权限描述" class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
</label>

View File

@ -13,7 +13,6 @@
{/block}
{block name="content"}
<div class="think-box-shadow table-block">
{include file='auth/index_search'}
<table class="layui-table margin-top-10" lay-skin="line">
@ -23,7 +22,8 @@
<th class='list-table-check-td think-checkbox'>
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
</th>
<th class='text-left nowrap'>权限信息</th>
<th class='text-left nowrap'>权限名称</th>
<th class='text-left nowrap'>权限描述</th>
<th class='text-left nowrap'>创建时间</th>
<th class="text-center nowrap">使用状态</th>
<th></th>
@ -31,42 +31,35 @@
</thead>
{/notempty}
<tbody>
{foreach $list as $key=>$vo}
{foreach $list as $key => $vo}
<tr data-dbclick>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
</td>
<td class='text-left'>
权限名称:{$vo.title|default='-'}<br>
<p class="color-desc">权限描述:{$vo.desc|default="没有写描述哦!"}</p>
</td>
<td class="text-left nowrap">
日期:{$vo.create_at|format_datetime|str_replace=' ','<br><span class="color-desc">时间:',###|raw}</span>
</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-left'>{$vo.title|default='-'}</td>
<td class='text-left'>{$vo.desc|default="没有写描述哦!"}</td>
<td class="text-left nowrap">{$vo.create_at|format_datetime}</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("edit")}
<span class="text-explode">|</span>
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑权限" data-modal='{:url("edit")}?id={$vo.id}'> </a>
<a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑权限" data-modal='{:url("edit")}?id={$vo.id}'> </a>
{/if}
{if auth("apply")}
<a class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("apply")}?id={$vo.id}'> </a>
<a class="layui-btn layui-btn-normal layui-btn-xs" data-open='{:url("apply")}?id={$vo.id}'> </a>
{/if}
{if $vo.status eq 1 and auth("state")}
<a class="layui-btn layui-btn-warm layui-btn-sm" data-confirm="确定禁用该权限吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}"> </a>
<a class="layui-btn layui-btn-warm layui-btn-xs" data-confirm="确定禁用该权限吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}"> </a>
{/if}
{if $vo.status eq 0 and auth("state")}
<a class="layui-btn layui-btn-warm layui-btn-sm" data-confirm="确定启用该权限吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}"> </a>
<a class="layui-btn layui-btn-warm layui-btn-xs" data-confirm="确定启用该权限吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}"> </a>
{/if}
{if 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('remove')}"> </a>
<a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除权限吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}"> </a>
{/if}
</td>

View File

@ -52,7 +52,7 @@
</td>
<td class='text-left nowrap'>
{if auth("remove")}
<a data-dbclick class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该日志吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}"> </a>
<a data-dbclick class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除该日志吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}"> </a>
{/if}
</td>
</tr>

View File

@ -81,23 +81,23 @@
<td class='text-left nowrap'>
{if isset($type) and $type eq 'all'}
<!--{if auth("pass")}-->
<a class="layui-btn layui-btn-sm layui-btn-normal" data-title="设置密码" data-modal='{:url("pass")}?id={$vo.id}'> </a>
<a class="layui-btn layui-btn-xs layui-btn-normal" data-title="设置密码" data-modal='{:url("pass")}?id={$vo.id}'> </a>
<!--{/if}-->
<!--{if auth("edit")}-->
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑用户" data-modal='{:url("edit")}?id={$vo.id}'> </a>
<a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑用户" data-modal='{:url("edit")}?id={$vo.id}'> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 1}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要禁用该禁用账号吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}"> </a>
<a class="layui-btn layui-btn-xs layui-btn-warm" data-confirm="确定要禁用该禁用账号吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}"> </a>
<!--{/if}-->
{else}
<!--{if auth("edit")}-->
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑用户" data-modal='{:url("edit")}?id={$vo.id}'> </a>
<a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑用户" data-modal='{:url("edit")}?id={$vo.id}'> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 0}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要恢复该账号吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}"> </a>
<a class="layui-btn layui-btn-xs layui-btn-warm" data-confirm="确定要恢复该账号吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}"> </a>
<!--{/if}-->
<!--{if auth("remove")}-->
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要永久删除此账号吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}"> </a>
<a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要永久删除此账号吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}"> </a>
<!--{/if}-->
{/if}
</td>