<!--
 * @Author: hua
 * @Date: 2019-05-20 15:24:19
 * @LastEditors: hua
 * @LastEditTime: 2019-05-20 16:04:39
 -->
{% extends "fladmin/public/base.html" %}
{% block title %}轮播图列表{% endblock %}

{% block content %}
<h2 class="sub-header">轮播图管理</h2>[ <a href="{{'CMS_BASEHOST'|sysconfig}}/fladmin/slide/add">添加轮播图</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>排序</th>
                    <th>是否显示</th>
                    <th>管理</th>
                </tr>
            </thead>
            <tbody>
                {% for row in list %}<tr>
                    <td>{{row.id}}</td>
                    <td><img style="{% if row.pic %}display:none{% endif %}"
                            src="{%if row.pic %}row.pic{% endif %}" width="90" height="60"></td>
                    <td>{{row.title}}</td>
                    <td>{{row.url}}</td>
                    <td>{{row.listorder}}</td>
                    <td>{{row.status_text}}</td>
                    <td><a href="{{'CMS_BASEHOST'|sysconfig}}/fladmin/slide/edit?id={{row.id}}">修改</a> | <a
                            onclick="delconfirm('{{"CMS_BASEHOST"|sysconfig}}/fladmin/slide/delete?id={{row.id}}')"
                            href="javascript:;">删除</a></td>
                </tr>{% endfor %}
            </tbody>
        </table>
    </div><!-- 表格结束 -->
</form><!-- 表单结束 -->

<form id="searcharc" class="navbar-form" action="{{'CMS_BASEHOST'|sysconfig}}/fladmin/slide/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 %}