{include file="common/header"/}
<div class="lemo-container">
    <div class="lemo-main">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>日志{:lang('list')}</legend>
            <blockquote class="layui-elem-quote">
                <div class="tabletop">
                    <div class="layui-inline">
                        <!--                        <label class="layui-form-label">搜索{:lang('username')}</label>-->
                        <div class="layui-input-inline">
                            <input type="text" name="keys" id="keys" lay-verify="required" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <button type="submit" class="layui-btn layui-btn-sm" lay-submit lay-filter="submit" id="search">
                            {:lang('search')}
                        </button>
                        <a href="javascript:;"  class="layui-btn layui-btn-sm layui-btn-danger"
                           data-href="{:url('delete')}" id="delAll">{:lang('delete checked')}</a>

                    </div>

                </div>

            </blockquote>
        </fieldset>
        <table class="layui-table" id="list" lay-filter="list"></table>
    </div>
</div>


<script type="text/html" id="action">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" data-href="{:url('delete')}">{:lang('del')}</a>
</script>
<script type="text/html" id="create_time">
    {{layui.util.toDateString(d.create_time*1000, 'yyyy-MM-dd HH:mm:ss')}}
</script>

{include file="common/footer"/}
<script>
    var tableIn=null;
    layui.config({
        base: "/static/admin/js/",
        version: true
    }).extend({
        Admin: 'Admin'
    }).use(['table','Admin'], function () {
        var table = layui.table;
        tableIn = table.render({
            elem: '#list',
            url: '{:url("index")}',
            method: 'post',
            cols: [[
                {checkbox: true, fixed: 'left'},
                {field: 'id', title: 'ID', width: 80, sort: true},
                {field: 'admin_id', title: 'admin_id', width: 80, sort: true},
                {field: 'username', title: '账号', width: 150, sort: true},
                {field: 'log_url', title: '地址', width: 150, templet: '#size', sort: true,},
                {field: 'log_content', title: '内容', width: 150, sort: true,},
                {field: 'log_title', title: '标题', width: 150, sort: true,},
                {field: 'log_agent', title: '浏览器', width: 120, sort: true,},
                {field: 'log_ip', title: 'ip', width: 80},
                {field: 'create_time', title: '时间', width: 180,templet:'#create_time'},
                {title:'操作',width:100, toolbar: '#action',align:"center"}
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 15,
            page: true,
       });
    });


</script>