index.html 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="{:url('route/index')}">URL美化</a></li>
  7. <li><a href="{:url('route/add')}">添加URL规则</a></li>
  8. </ul>
  9. <form class="js-ajax-form" action="{:url('route/listOrder')}" method="post">
  10. <div class="table-actions">
  11. <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
  12. </div>
  13. <table class="table table-hover table-bordered table-list">
  14. <thead>
  15. <tr>
  16. <th width="50">排序</th>
  17. <th width="50">ID</th>
  18. <th>原始网址</th>
  19. <th>显示网址</th>
  20. <th>类型</th>
  21. <th>状态</th>
  22. <th width="140">操作</th>
  23. </tr>
  24. </thead>
  25. <php>
  26. $statuses=array('0'=>"已禁用","1"=>"已启用");
  27. $types=array('1'=>"自定义","2"=>"别名定义");
  28. </php>
  29. <foreach name="routes" item="vo">
  30. <tr>
  31. <td>
  32. <eq name="vo.type" value="2">
  33. <input class="input-order" type="text" value="{$vo.list_order}" readonly>
  34. <else/>
  35. <input name="list_orders[{$vo.id}]" class="input-order" type="text"
  36. value="{$vo.list_order}">
  37. </eq>
  38. </td>
  39. <td>{$vo.id}</td>
  40. <td>{$vo.full_url}</td>
  41. <td>{$vo.url}</td>
  42. <td>
  43. <eq name="vo.type" value="2">
  44. <span class="label label-danger" data-toggle="tooltip" title="别名定义规则,无法编辑,排序">{$types[$vo['type']]}</span>
  45. <else/>
  46. <span class="label label-success" data-toggle="tooltip" title="自定义规则,可以编辑,排序">{$types[$vo['type']]}</span>
  47. </eq>
  48. </td>
  49. <td>
  50. <empty name="vo.status">
  51. <span class="label label-default">{$statuses[$vo['status']]}</span>
  52. <else/>
  53. <span class="label label-success">{$statuses[$vo['status']]}</span>
  54. </empty>
  55. </td>
  56. <td>
  57. <eq name="vo.type" value="2">
  58. <span class="btn btn-xs btn-primary disabled">编辑</span>
  59. <span class="btn btn-xs btn-warning disabled">禁用</span>
  60. <span class="btn btn-xs btn-danger disabled">删除</span>
  61. <else/>
  62. <a class="btn btn-xs btn-primary" href="{:url('route/edit',array('id'=>$vo['id']))}">编辑</a>
  63. <eq name="vo.status" value="1">
  64. <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
  65. href="{:url('route/ban',array('id'=>$vo['id']))}"
  66. data-msg="确定禁用吗?">禁用</a>
  67. <else/>
  68. <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
  69. href="{:url('route/open',array('id'=>$vo['id']))}"
  70. data-msg="确定启用吗?">启用</a>
  71. </eq>
  72. <a class="btn btn-xs btn-danger js-ajax-delete"
  73. href="{:url('route/delete',array('id'=>$vo['id']))}">删除</a>
  74. </eq>
  75. </td>
  76. </tr>
  77. </foreach>
  78. <tfoot>
  79. <tr>
  80. <th width="50">排序</th>
  81. <th width="50">ID</th>
  82. <th>原始网址</th>
  83. <th>显示网址</th>
  84. <th>类型</th>
  85. <th>状态</th>
  86. <th width="130">操作</th>
  87. </tr>
  88. </tfoot>
  89. </table>
  90. <div class="table-actions">
  91. <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
  92. </div>
  93. </form>
  94. </div>
  95. <script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  96. </body>
  97. </html>