systemmanage_help.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. {% extends "base.html" %}
  2. {% block headcss %}
  3. {% load staticfiles %}
  4. </head>
  5. <body>
  6. <div id="content">
  7. <div id="content-header">
  8. <h1 class="tb-fpsb" style="display: inline-block;">系统管理</h1>
  9. <span id="">
  10. > 帮助中心设置
  11. </span>
  12. </div>
  13. <div class="fpsb-shaixuan">
  14. <form id="form" action="http://120.27.222.26:80/system/help/set" method="post">
  15. <div class="form-item">
  16. <div class="sx-title">标题:</div>
  17. <div class="enter-form">
  18. <input type="text" class="fp-user" name= "title" value="" placeholder="请输入用户名" />
  19. </div>
  20. <input type="hidden" name="pageNum" id="pageNum">
  21. <div class="sx-title"><button class="btn btn-primary btn-shaixuan">搜索</button> </div>
  22. <div class="sx-title"><button type="button" onclick="add()" class="btn btn-success btn-shaixuan">新增</button></div>
  23. </div>
  24. </form>
  25. </div>
  26. <div class="container-fluid">
  27. <div class="row-fluid">
  28. <div class="span12">
  29. <div class="widget-box">
  30. <div class="widget-content ">
  31. <table class="table table-striped table-striped">
  32. <thead>
  33. <tr>
  34. <th>标题</th>
  35. <th>问题</th>
  36. <th>回答</th>
  37. <th>时间</th>
  38. <th>操作</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. {% for help in help_list %}
  43. <tr>
  44. <th style="width: 10%;">{{help.help_title}}</th>
  45. <th style="width: 15%;">{{help.help_ask}}</td>
  46. <th style="width: 30%;">{{help.help_answer}}</td>
  47. <th style="width: 20%;">{{help.help_edit_time}}</td>
  48. <td>
  49. <a href="" ><button class="btn btn-success">修改</button></a>
  50. <button onclick="del('1')" class="btn btn-danger">删除</button>
  51. </td>
  52. </tr>
  53. {% endfor %}
  54. </tbody>
  55. </table>
  56. <div id="page" style="text-align: center;"> </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <script src="{% static '/js/jquery.min.js' %}"></script>
  64. <script src="{% static '/js/jquery.ui.custom.js' %}"></script>
  65. <script src="{% static '/js/bootstrap.min.js' %}"></script>
  66. <script src="{% static '/js/jquery.uniform.js' %}"></script>
  67. <script src="{% static '/js/select2.min.js' %}"></script>
  68. <script src="{% static '/js/jquery.dataTables.min.js' %}"></script>
  69. <script src="{% static '/js/matrix.js' %}"></script>
  70. <script src="{% static '/js/matrix.tables.js' %}"></script>
  71. <script src="{% static '/js/bootstrap-colorpicker.js' %}"></script>
  72. <script src="{% static '/js/bootstrap-datepicker.js' %}"></script>
  73. <script src="{% static '/js/masked.js' %}"></script>
  74. <script src="{% static '/js/laydate/laydate.js' %}"></script>
  75. <script src="{% static '/js/laypage.js' %}"></script>
  76. <script src="{% static '/js/layer.js' %}"></script>
  77. <script src="{% static '/js/loadSelctData.js' %}"></script>
  78. <script src="{% static '/js/distpicker.data.js' %}" type="text/javascript" charset="utf-8"></script>
  79. <script src="{% static '/js/distpicker.js' %}" type="text/javascript" charset="utf-8"></script>
  80. <script src="{% static '/js/main.js' %}" type="text/javascript" charset="utf-8"></script>
  81. <script type="text/javascript">
  82. function del(id){
  83. layer.confirm('确定要删除吗', {
  84. btn: ['确定','取消'] //按钮
  85. }, function(){
  86. $.ajax({
  87. type:"post",
  88. url:"http://120.27.222.26:80/system/help/del",
  89. data : {"id": id},
  90. dataType : "json",
  91. async: false ,
  92. success : function(data) {
  93. if(data.err == 0){
  94. layer.alert(data.msg,function(){
  95. location.reload();
  96. });
  97. }else{
  98. layer.msg(data.msg);
  99. }
  100. }
  101. });
  102. });
  103. }
  104. function add(){
  105. location.href="http://120.27.222.26:80/system/help/toAdd";
  106. }
  107. /* var begin = {
  108. elem: '#begin',
  109. format: 'YYYY-MM-DD hh:mm:ss',
  110. max: laydate.now(),
  111. istime: true,
  112. choose: function(datas){
  113. end.min = datas; //结束日选好后,重置开始日的最大日期
  114. }
  115. };
  116. var end = {
  117. elem: '#end',
  118. format: 'YYYY-MM-DD hh:mm:ss',
  119. max: laydate.now(),
  120. istime: true,
  121. choose: function(datas){
  122. begin.max = datas; //结束日选好后,重置开始日的最大日期
  123. }
  124. };
  125. if(""!=""){
  126. begin.max = "";
  127. }
  128. if(""!=""){
  129. end.min = "";
  130. }
  131. laydate(begin);
  132. laydate(end);
  133. */
  134. laypage({
  135. cont: 'page',
  136. pages: '2', //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18
  137. curr: '1'==''?1:1,
  138. jump: function(e, first){ //触发分页后的回调
  139. if(!first){ //一定要加此判断,否则初始时会无限刷新
  140. $("#pageNum").val(e.curr);
  141. $("#form").submit();
  142. }
  143. }
  144. });
  145. </script>
  146. </body>
  147. </html>
  148. {% endblock headcss %}