index.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {extend name="../../admin/view/main"}
  2. {block name="button"}
  3. <!--{if auth("add")}-->
  4. <button data-open='{:url("add")}' class='layui-btn layui-btn-sm layui-btn-primary'>添加文章</button>
  5. <!--{/if}-->
  6. <!--{if auth("remove")}-->
  7. <button data-action='{:url("remove")}' data-rule="id#{key}" data-confirm="确定要删除这些文章吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除文章</button>
  8. <!--{/if}-->
  9. <!--{if auth("news_mark/index")}-->
  10. <button data-iframe='{:url("news_mark/index")}' data-width="900px" data-title="标签管理" class='layui-btn layui-btn-sm layui-btn-primary'>标签管理</button>
  11. <!--{/if}-->
  12. {/block}
  13. {block name='content'}
  14. <div class="think-box-shadow'amount'">
  15. {include file='news_item/index_search'}
  16. <table class="layui-table margin-top-10" lay-skin="line">
  17. {notempty name='list'}
  18. <thead>
  19. <tr>
  20. <th class='list-table-check-td think-checkbox'>
  21. <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
  22. </th>
  23. <th class='list-table-sort-td'>
  24. <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
  25. </th>
  26. <th class="text-left nowrap">文章编号</th>
  27. <th class="text-left nowrap">文章名称</th>
  28. <th class="text-left nowrap">搜索标签</th>
  29. <th class="text-left nowrap">文章状态</th>
  30. <th class="text-left nowrap">创建时间</th>
  31. <th class="text-left nowrap"></th>
  32. </tr>
  33. </thead>
  34. {/notempty}
  35. <tbody>
  36. {foreach $list as $key=>$vo}
  37. <tr>
  38. <td class='list-table-check-td think-checkbox'>
  39. <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
  40. </td>
  41. <td class='list-table-sort-td'>
  42. <label><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"></label>
  43. </td>
  44. <td class="text-left nowrap">{$vo.code|default=''}</td>
  45. <td class="text-left nowrap">{$vo.name|default=''}</td>
  46. <td class="text-left nowrap">{notempty name='vo.mark'}{foreach $vo.mark as $tag}<span data-tips-text="热搜标签" class="margin-right-5 layui-badge layui-bg-cyan">{$tag}</span>{/foreach}{/notempty}<br></td>
  47. <td class="text-left nowrap">{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">已激活</span>{/if}</td>
  48. <td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
  49. <td class='text-left nowrap'>
  50. <!--{if auth("edit")}-->
  51. <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑文章文章" data-open="{:url('edit')}?id={$vo.id}">编 辑</a>
  52. <!--{/if}-->
  53. <!--{if auth("state") and $vo.status eq 1}-->
  54. <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0">禁 用</a>
  55. <!--{/if}-->
  56. <!--{if auth("state") and $vo.status eq 0}-->
  57. <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1">激 活</a>
  58. <!--{/if}-->
  59. <!--{if auth("remove")}-->
  60. <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该文章吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
  61. <!--{/if}-->
  62. </td>
  63. </tr>
  64. {/foreach}
  65. </tbody>
  66. </table>
  67. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  68. </div>
  69. {/block}