group.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {include file="public/header"}
  2. <form action="group" method="GET" class="form-inline">
  3. <div class="form-group">
  4. <label>搜索</label>
  5. <select name="type" class="form-control">
  6. <option value="1">小区名称</option>
  7. </select>
  8. </div>
  9. <div class="form-group">
  10. <input type="text" class="form-control" name="keyword" placeholder="搜索内容">
  11. </div>
  12. <button type="submit" class="btn btn-primary">搜索</button>
  13. <button type="button" class="btn btn-primary" id="addgroup">添加小组</button>
  14. </form>
  15. <div class="table-responsive" style="padding-top: 10px;">
  16. <table class="table table-striped" border='1'>
  17. <thead>
  18. <tr>
  19. <th style="text-align: center;">分组编号</th>
  20. <th style="text-align: center;">小组名称</th>
  21. <th style="text-align: center;">添加时间</th>
  22. <th style="text-align: center;">操作</th>
  23. </tr>
  24. </thead>
  25. <tbody style="text-align: center;">
  26. {volist name="group_info" id="vo"}
  27. <tr>
  28. <td><b>{$vo.id}</b></td>
  29. <td>
  30. {if condition = "$vo.name eq null"}
  31. 暂无
  32. {else/}
  33. {$vo.name}
  34. {/if}
  35. </td>
  36. <td>
  37. {if condition = "$vo.addtime eq null"}
  38. 暂无
  39. {else/}
  40. {$vo.addtime | date="Y-m-d H:i:s",###}
  41. {/if}
  42. </td>
  43. <td>
  44. <button data-groupid="{$vo['id']}" class="btn btn-xs btn-info buttoneidt">编辑</button>
  45. </td>
  46. </tr>
  47. {/volist}
  48. </tbody>
  49. <thead>
  50. <tr>
  51. <th style="text-align: center;">分组编号</th>
  52. <th style="text-align: center;">小组名称</th>
  53. <th style="text-align: center;">添加时间</th>
  54. <th style="text-align: center;">操作</th>
  55. </tr>
  56. </thead>
  57. </table>
  58. </div>
  59. <!-- 分页的渲染函数 -->
  60. <div style="text-align:center;">
  61. {$group_info->render()}
  62. </div>
  63. <script src="__LOGIN__/js/jquery.min.js"></script>
  64. <script>
  65. $(function () {
  66. $('.buttoneidt').click(function () {
  67. let groupid = $(this).attr('data-groupid');
  68. window.location.href = "__URL__/edit_group?group_id=" + groupid; //编辑分组信息
  69. });
  70. $('#addgroup').click(function(){
  71. window.location.href = "__URL__/add_group"; //添加分组
  72. });
  73. });
  74. </script>