2020-09-15 11:37:40 +08:00

56 lines
1.6 KiB
PHP

{extend name="../../admin/view/full"}
{block name='content'}
<div class="padding-25" data-select-container>
{include file='news_item/select_search'}
<table class="layui-table margin-top-10" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<th>文章标题</th>
<th>文章状态</th>
<th>创建时间</th>
<th></th>
</tr>
</thead>
{/notempty}
<tbody>
{foreach $list as $key => $vo}
<tr>
<td class="nowrap">{$vo.title|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>{$vo.create_at|format_datetime}</td>
<td class='text-right'><a class="layui-btn layui-btn-sm layui-btn-normal" data-item="{$vo.id}">选择文章</a></td>
</tr>
{/foreach}
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
{block name='style'}
<style>
.pagination-container {
left: 0;
right: 0;
bottom: 0;
position: fixed;
background: #fff;
text-indent: 20px;
}
</style>
{/block}
{block name='script'}
<script>
$(function () {
$.form.reInit(), layui.form.render();
$('[data-item]').on('click', function () {
top.setCheckValue(this.getAttribute('data-item') || '');
parent.layer.close(parent.layer.getFrameIndex(window.name));
});
});
</script>
{/block}