| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- {% extends "base.html" %}
- {% block headcss %}
- {% load staticfiles %}
- </head>
- <body>
- <div id="content">
- <div id="content-header">
- <h1 class="tb-fpsb" style="display: inline-block;">系统管理</h1>
- <span id="">
- > 帮助中心设置
- </span>
- </div>
- <div class="fpsb-shaixuan">
- <form id="form" action="http://120.27.222.26:80/system/help/set" method="post">
- <div class="form-item">
- <div class="sx-title">标题:</div>
- <div class="enter-form">
- <input type="text" class="fp-user" name= "title" value="" placeholder="请输入用户名" />
- </div>
- <input type="hidden" name="pageNum" id="pageNum">
- <div class="sx-title"><button class="btn btn-primary btn-shaixuan">搜索</button> </div>
- <div class="sx-title"><button type="button" onclick="add()" class="btn btn-success btn-shaixuan">新增</button></div>
- </div>
- </form>
- </div>
- <div class="container-fluid">
- <div class="row-fluid">
- <div class="span12">
- <div class="widget-box">
- <div class="widget-content ">
- <table class="table table-striped table-striped">
- <thead>
- <tr>
- <th>标题</th>
- <th>问题</th>
- <th>回答</th>
- <th>时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- {% for help in help_list %}
- <tr>
- <th style="width: 10%;">{{help.help_title}}</th>
- <th style="width: 15%;">{{help.help_ask}}</td>
- <th style="width: 30%;">{{help.help_answer}}</td>
- <th style="width: 20%;">{{help.help_edit_time}}</td>
- <td>
- <a href="" ><button class="btn btn-success">修改</button></a>
- <button onclick="del('1')" class="btn btn-danger">删除</button>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- <div id="page" style="text-align: center;"> </div>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- </div>
- <script src="{% static '/js/jquery.min.js' %}"></script>
- <script src="{% static '/js/jquery.ui.custom.js' %}"></script>
- <script src="{% static '/js/bootstrap.min.js' %}"></script>
- <script src="{% static '/js/jquery.uniform.js' %}"></script>
- <script src="{% static '/js/select2.min.js' %}"></script>
- <script src="{% static '/js/jquery.dataTables.min.js' %}"></script>
- <script src="{% static '/js/matrix.js' %}"></script>
- <script src="{% static '/js/matrix.tables.js' %}"></script>
- <script src="{% static '/js/bootstrap-colorpicker.js' %}"></script>
- <script src="{% static '/js/bootstrap-datepicker.js' %}"></script>
- <script src="{% static '/js/masked.js' %}"></script>
- <script src="{% static '/js/laydate/laydate.js' %}"></script>
- <script src="{% static '/js/laypage.js' %}"></script>
- <script src="{% static '/js/layer.js' %}"></script>
- <script src="{% static '/js/loadSelctData.js' %}"></script>
- <script src="{% static '/js/distpicker.data.js' %}" type="text/javascript" charset="utf-8"></script>
- <script src="{% static '/js/distpicker.js' %}" type="text/javascript" charset="utf-8"></script>
- <script src="{% static '/js/main.js' %}" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript">
- function del(id){
- layer.confirm('确定要删除吗', {
- btn: ['确定','取消'] //按钮
- }, function(){
- $.ajax({
- type:"post",
- url:"http://120.27.222.26:80/system/help/del",
- data : {"id": id},
- dataType : "json",
- async: false ,
- success : function(data) {
- if(data.err == 0){
- layer.alert(data.msg,function(){
- location.reload();
- });
- }else{
- layer.msg(data.msg);
- }
- }
- });
- });
- }
- function add(){
- location.href="http://120.27.222.26:80/system/help/toAdd";
- }
- /* var begin = {
- elem: '#begin',
- format: 'YYYY-MM-DD hh:mm:ss',
- max: laydate.now(),
- istime: true,
- choose: function(datas){
- end.min = datas; //结束日选好后,重置开始日的最大日期
- }
- };
- var end = {
- elem: '#end',
- format: 'YYYY-MM-DD hh:mm:ss',
- max: laydate.now(),
- istime: true,
- choose: function(datas){
- begin.max = datas; //结束日选好后,重置开始日的最大日期
- }
- };
-
- if(""!=""){
- begin.max = "";
- }
- if(""!=""){
- end.min = "";
- }
- laydate(begin);
- laydate(end);
- */
- laypage({
- cont: 'page',
- pages: '2', //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18
- curr: '1'==''?1:1,
- jump: function(e, first){ //触发分页后的回调
- if(!first){ //一定要加此判断,否则初始时会无限刷新
- $("#pageNum").val(e.curr);
- $("#form").submit();
- }
- }
- });
- </script>
- </body>
- </html>
- {% endblock headcss %}
|