{% extends "base.html" %}

{% load staticfiles %}
{% load i18n %}

{% block css%}
    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="{% static "css/font-awesome.min.css" %}">
    <link rel="stylesheet" href="{% static "dist/css/AdminLTE.min.css" %}">
    <link rel="stylesheet" href="{% static "dist/css/skins/_all-skins.min.css" %}">
    <link rel="stylesheet" href="{% static "plugins/iCheck/flat/blue.css" %}">
    <link rel="stylesheet" href="{%static "css/ionicons.min.css" %}">
    <link rel="stylesheet" href="{% static "plugins/datatables/dataTables.bootstrap.css"%}">

    <link rel="stylesheet" href="{% static "css/select2.min.css"%}">
    <link rel="stylesheet" href="{% static "css/style.css"%}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="{% static "js/html5shiv.min.js" %}"></script>
    <script src="{% static "js/respond.min.js" %}"></script>
    <![endif]-->
{% endblock %}

{% block content %}
    <div class="fakeloader"></div>
    <div class="content-wrapper" style="min-height: 692px;">
        <section class="content-header">
            <h1>
                用户管理
                <small>用户列表管理</small>
            </h1>
            <ol class="breadcrumb">
                <li class="active"><a href="/"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="/packagemanage/">用户管理</a></li>
                <li>用户列表管理</li>
            </ol>
        </section>

        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div id="user-content" class="nav-tabs-custom">
                        <div class="box-body">
                            <table id="user-list" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>用户名</th>
                                        <th>权限级别</th>
                                        <th>创建时间</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for user in users %}
                                        <tr>
                                            <td>{{ user.user_name }}</td>
                                            <td>{{ user.level }}</td>
                                            <td>{{ user.create_time }}</td>
                                            <td>{{ user.status }}</td>
                                            <td>
                                                <a href="#" class="btn btn-success btn-xs" role="button">
                                                    <i class="fa fa-fw fa-cog"></i>编辑
                                                </a>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                </tbody>
                            </table>
                        </div><!-- /.box-body -->
                    </div> <!-- /nav-tab-custom -->
                </div>
            </div>
        </section>
    </div>
<!-- page header end -->
{% endblock %}

{% block js %}
<script type="text/javascript">
{#    $('select').select2();#}
    $("#packagemanagesubmenu").attr("class","active");
    $("#ywtoolmenu").attr("class","treeview active");
{#    $('.template-select').select2();#}
    var parentDataTable = $('#parent-packages-list').DataTable({
    });
    var packageDataTable = $('#packages-list').DataTable({
        "iDisplayLength": 50
    });
</script>
{% endblock %}