<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								学员名称：<input type="text" name="studentName"/>
							</li>

							<li style="width: 100%;text-align: center">
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "teach/student";

        $(function() {
            var datas = [[${@dict.getType('teach_status')}]];
            var options = {
                url: prefix + "/list",
                modalName: "学生",
				search: false,
                singleSelect: true,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'studentId',
					title : '学生ID',
					visible: true
				},
				{
					field : 'studentName',
					title : '学生名称',
					sortable: false
				},
				{
					field : 'classes.className',
					title : '所属班级',
					sortable: false
				},
				{
					field : 'status',
					title : '状态',
					sortable: false,
                    formatter: function (value, row, index) {
                        if(value == 3){
                            return "<span class='badge'>转班</span>"
                        }else{
                            return $.table.selectDictLabel(datas, value);
                        }
                    }
				}]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>