<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>客观小题管理</title>
	<meta name="decorator" content="default"/>
	<%@include file="/WEB-INF/views/include/head.jsp" %>
	<%@include file="/WEB-INF/views/include/dialog.jsp" %>
	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
</head>
<body>
	<form id="searchForm"  action="${ctx}/admin/exam-param/objective/${block.id}" method="post" class="breadcrumb form-search">
		<div>
			<label>科目：${block.examSubject.name}</label>
			<label>大题：${block.title}</label>
			&nbsp;
			<a href="${ctx}/admin/exam-param/objective" class="btn btn-primary">返回</a>
		</div>
	</form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>小题序号</th>
				<th>小题名称</th>
				<th>答案</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${block.questionList}" var="question">
			<tr>
				<td>${question.number}</td>
				<td>${question.title}</td>
				<td>${question.answer }</td>
				<td>
				<a class="delete-button" href="${ctx}/admin/exam-param/objective/delete-question/${block.id}/${question.number}">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
<script type="text/javascript">
$('.delete-button').click(function(){
	if(confirm('确定要删除该小题吗?')){
		return true;
	}
	return false;
});
</script>	
</body>
</html>