2022-03-04 23:02:56 +08:00

64 lines
3.1 KiB
PHP

{extend name="../../admin/view/full"}
{block name='content'}
<div class="iframe-pagination">
{include file='news/mark/index_search'}
<table class="layui-table margin-top-10" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<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='list-table-sort-td'>
<button class="layui-btn layui-btn-xs" data-reload type="button"> </button>
</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>
</tr>
</thead>
{/notempty}
<tbody>
{foreach $list as $key=>$vo}
<tr data-dbclick>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
</td>
<td class='list-table-sort-td'>
<label><input class="list-sort-input" data-action-blur="{:sysuri()}" data-loading="false" data-value="id#{$vo.id};action#sort;sort#{value}" value="{$vo.sort}"></label>
</td>
<td class="text-left nowrap">{$vo.name|default=''}</td>
<td>{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">已激活</span>{/if}</td>
<td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
<td class='text-left nowrap'>
<!--{if auth("edit")}-->
<a class="layui-btn layui-btn-sm" data-dbclick data-modal="{:url('edit')}?id={$vo.id}" data-title="编辑标签" data-width="500px"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 1}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 0}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1"> </a>
<!--{/if}-->
<!--{if auth("remove")}-->
<a class="layui-btn layui-btn-sm layui-btn-danger" data-action="{:url('remove')}" data-confirm="确定要删除该标签吗?" data-value="id#{$vo.id}"> </a>
<!--{/if}-->
</td>
</tr>
{/foreach}
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
<!--{if auth("add")}-->
<div class="fixed" style="bottom:5px;right:10px">
<button class='layui-btn layui-btn-sm' data-modal='{:url("add")}' data-title="添加标签" data-width="500px" type="button">添加标签</button>
</div>
<!--{/if}-->
</div>
{/block}