<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
<%@ include file="../common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="../common/top.jsp"%>
</head>
<body class="easyui-layout">
	<%@ include file="../common/header.jsp"%>
	<%@ include file="../leftMenu/campus-admin.jsp"%>
	<div data-options="region:'center',title:'首页 -【基础数据维护】- 学习中心信息管理'">
		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'north',border:false" class="domain">
				<div data-options="region:'north',border:false" class="domain">
					<p class="fr">
						<a href='${ctx}/admin/campus/edit/${campus.id}'><button class="btn btn-primary"
								type="button">
								<i class="icon-pencil icon-white"></i> 编辑学习中心信息
							</button>
						</a> <a href='${ctx}/admin/student/list'><button class="btn" type="button">
								<i class="icon-arrow-right"></i> 进入学生管理
							</button>
						</a>
					</p>
				</div>
			</div>
			<div data-options="region:'center'" style="border-color: #ccc; border-left: none;">
				<table width="100%" class="table table-bordered table-striped"
					style="width: 800px; margin: 0 auto; margin-top: 100px;">
					<tbody>
						<tr>
							<td width="20%">学习中心名称：</td>
							<td width="30%">${campus.name}</td>
							<td width="20%">学习中心层次：</td>
							<td width="30%"><c:if test="${campus.level.value==1}">小学</c:if> <c:if
									test="${campus.level.value==2}">初中</c:if> <c:if test="${campus.level.value==3}">高中</c:if> <c:if
									test="${campus.level.value==4}">中学</c:if> <c:if test="${campus.level.value==5}">大学</c:if> <c:if
									test="${campus.level.value==6}">研究生</c:if></td>
						</tr>
						<tr>
							<td width="20%">省份</td>
							<td width="30%">${campus.province}</td>
							<td width="20%">城市</td>
							<td width="30%">${campus.city}</td>
						</tr>
						<tr>
							<td width="20%">地区</td>
							<td width="30%">${campus.district}</td>
							<td width="20%">电话</td>
							<td width="30%">${campus.phone}</td>
						</tr>
						<tr>
							<td width="20%">描述</td>
							<td width="80%" colspan="3">${campus.description}</td>
						</tr>
						<tr>
							<td width="20%">学习中心地址：</td>
							<td width="80%" colspan="3">${campus.address}</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function() {
		$("#campusItem").addClass("active");
		$("#studentItem").removeClass("active");
	});

	/* $("#area").chinaprovinces({
		valueType : 'id',
		change : function(province, city, area) {
			$("#province").val(province);
			$("#city").val(city);
			$("#district").val(area);
		}
	});

	$('#campus-tree').tree({
		data : eval('${treeData}'),
		onClick : onTreeNodeClick
	});

	function onTreeNodeClick(node) {
		var isLeaf = $('#campus-tree').tree('isLeaf', node.target);
		if (isLeaf) {
			var url = '${ctx}/admin/student/list/' + node.id;
			window.location.href = url;
		} else if(node.id==0){
			var url = '${ctx}/admin/campus/list';
			window.location.href = url;
		}else{
			var url = '${ctx}/admin/student/studentlist/'+node.id;
			window.location.href = url;
		}
	}
	
		$('#dg').datagrid({
			pagination:'true',
			rownumbers:true,
			singleSelect:true,
			fit:true,
			border:false,
			fitColumns:true,
			striped:true,
			url:'${ctx}/admin/campus/list'
		});
		
		//设置分页控件 
	    var p = $('#dg').datagrid('getPager'); 
	    $(p).pagination({ 
	        pageSize: 15,//每页显示的记录条数，默认为10 
	        pageList: [15],//可以设置每页记录条数的列表 
	        onSelectPage:function(pageNumber){   
	              var url='${ctx}/admin/campus/list';
	              window.location.href = url;
	        }
	    });  */
</script>
</html>
