<!--
 * @Author: hua
 * @Date: 2019-05-15 08:50:57
 * @LastEditors: hua
 * @LastEditTime: 2019-05-16 13:25:31
 -->
{% extends "fladmin/public/base.html" %}
{% block title %}操作记录列表{% endblock %}

{% block content %}
<h2 class="sub-header">操作记录列表</h2>[ <a href="{{'CMS_BASEHOST'|sysconfig}}/fladmin/admin_log/clear">清空记录</a> ]<br><br>

<form name="listarc">
    <div class="table-responsive">
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th>编号</th>
                    <th>操作时间</th>
                    <th>操作者</th>
                    <th>操作记录</th>
                    <th>IP地址</th>
                </tr>
            </thead>
            <tbody>
                {% for row in list %}<tr>
                    <td>{{row.id}}</td>
                    <td>{{row.add_time|date}}</td>
                    <td>{{row.admin_name}}</td>
                    <td>{{row.http_method}} -{{row.route}} -
                        {{row.content}}</td>
                    <td> {{row.ip}}</td>
                </tr>{% endfor %}
            </tbody>
        </table>
    </div><!-- 表格结束 -->
</form><!-- 表单结束 -->

<form id="searcharc" class="navbar-form" action="{{'CMS_BASEHOST'|sysconfig}}/fladmin/admin_log/index" method="get">
    <div class="form-group"><input type="text" name="keyword" id="keyword" class="form-control required"
            placeholder="搜索关键词..."></div>
    <button type="submit" class="btn btn-info" value="Submit">搜索一下</button>
</form>
<ul class="pagination" style="margin: 0 20px 0 20px;">
</ul>
<script>
    //进行查询
    function query(e, page) {
        window.location.href = '?page=' + page
    };
     //这里回调
     $(".pagination").unbind();
     $(".pagination").pagination({
         total_pages:{{ page.total_page }},
         current_page:{{ page.current_page }},
         callback:query
     });
</script>
{% endblock %}