index.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {extend name='main'}
  2. {block name="button"}
  3. <!--{if auth("add")}-->
  4. <button data-modal='{:url("add")}' data-title="添加菜单" class='layui-btn layui-btn-sm layui-btn-primary'>添加菜单</button>
  5. <!--{/if}-->
  6. <!--{if auth("remove")}-->
  7. <button data-action='{:url("remove")}' data-csrf="{:systoken('remove')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除菜单</button>
  8. <!--{/if}-->
  9. {/block}
  10. {block name="content"}
  11. <div class="think-box-shadow table-block">
  12. {empty name='list'}
  13. <blockquote class="layui-elem-quote">没 有 记 录 哦!</blockquote>
  14. {else}
  15. <table class="layui-table" lay-skin="line">
  16. <thead>
  17. <tr>
  18. <th class='list-table-check-td think-checkbox'>
  19. <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
  20. </th>
  21. <th class='list-table-sort-td'>
  22. <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
  23. </th>
  24. <th class='text-center' style="width:30px"></th>
  25. <th style="width:230px"></th>
  26. <th class='layui-hide-xs' style="width:180px"></th>
  27. <th colspan="2"></th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. {foreach $list as $key=>$vo}
  32. <tr data-dbclick>
  33. <td class='list-table-check-td think-checkbox'>
  34. <label><input class="list-check-box" value='{$vo.ids}' type='checkbox'></label>
  35. </td>
  36. <td class='list-table-sort-td'>
  37. <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">
  38. </td>
  39. <td class='text-center'><i class="{$vo.icon} font-s18"></i></td>
  40. <td class="nowrap"><span class="color-desc">{$vo.spl|raw}</span>{$vo.title}</td>
  41. <td class='layui-hide-xs'>{$vo.url}</td>
  42. <td class='text-center nowrap'>{eq name='vo.status' value='0'}<span class="color-red">已禁用</span>{else}<span class="color-green">已激活</span>{/eq}</td>
  43. <td class='text-center nowrap notselect'>
  44. {if auth("add")}
  45. <!--{if $vo.spt < 2}-->
  46. <a class="layui-btn layui-btn-xs layui-btn-primary" data-title="添加子菜单" data-modal='{:url("add")}?pid={$vo.id}'>添 加</a>
  47. <!--{else}-->
  48. <a class="layui-btn layui-btn-xs layui-btn-disabled">添 加</a>
  49. <!--{/if}-->
  50. {/if}
  51. <!--{if auth("edit")}-->
  52. <a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑菜单" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
  53. <!--{/if}-->
  54. <!--{if $vo.status eq 1 and auth("state")}-->
  55. <a class="layui-btn layui-btn-warm layui-btn-xs" data-confirm="确定要禁用菜单吗?" data-action="{:url('state')}" data-value="id#{$vo.ids};status#0" data-csrf="{:systoken('state')}">禁 用</a>
  56. <!--{/if}-->
  57. <!--{if $vo.status eq 0 and auth("state")}-->
  58. <a class="layui-btn layui-btn-warm layui-btn-xs" data-action="{:url('state')}" data-value="id#{$vo.ids};status#1" data-csrf="{:systoken('state')}">激 活</a>
  59. <!--{/if}-->
  60. <!--{if auth("remove")}-->
  61. <a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.ids}" data-csrf="{:systoken('remove')}">删 除</a>
  62. <!--{/if}-->
  63. </td>
  64. </tr>
  65. {/foreach}
  66. </tbody>
  67. </table>
  68. {/empty}
  69. </div>
  70. {/block}