<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script>
	<script th:include="sys/common/selectSearchJS" th:remove="tag"></script>
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 70px;
	}
	.date_width{
	     width: 60px;
	}
</style>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">图书馆管理</a></li>
		<li><a th:href="@{/sys/lib/libBookInfoList.html}">图书列表</a></li>
	</ul>
</div>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/lib/libBookInfoList.html}" method="post">
	<ul class="seachform">
		<li>
			<label>书名</label>
			<input name="title" type="text" class="scinput date_width" th:value="${search.get('title')} == null  ? '': ${search.get('title')}"/>
		</li>
		
		<li>
				<label>图书馆</label>
					<select class="scinput select_width"  name="libId"  id="brand"  style="width: 70px;" >
						<option value=""   >全部</option>
						<option th:each="item:${libList}"  th:value="${item.id}"  th:selected="${ search.get('libId') eq item.id }"  th:text="${item.leagueName}"></option>
					</select>
		</li>
		<li>
				<label>书籍分类</label>
					<select class="scinput select_width"  name="bookTae"   style="width: 70px;" >
						<option value=""   >全部</option>
						<option th:each="item:${book_tags}"  th:value="${item.code}"  th:selected="${ search.get('book_tags') eq item.code }"  th:text="${item.name}"></option>
					</select>
		</li>
			<li>
				<label>编码分类</label>
					<select class="scinput select_width"  name="bookCase"   style="width: 70px;" >
						<option value=""   >全部</option>
						<option th:each="item:${book_case}"  th:value="${item.code}"  th:selected="${ search.get('book_case') eq item.code }"  th:text="${item.name}"></option>
					</select>
		</li>
		<li>
			<label>起始年龄</label>
			<input name="startAge" type="text" class="scinput date_width" th:value="${search.get('startAge')} == null  ? '': ${search.get('startAge')}"/>
		</li>
		<li>
			<label>结束年龄</label>
			<input name="endAge" type="text" class="scinput date_width" th:value="${search.get('endAge')} == null  ? '': ${search.get('endAge')}"/>
		</li>
		<li>
			<label>一级主题</label>
			<input name="parentTheme" type="text" class="scinput date_width" th:value="${search.get('parentTheme')} == null  ? '': ${search.get('parentTheme')}"/>
		</li>
		<li>
			<label>二级主题</label>
			<input name="childTheme" type="text" class="scinput date_width" th:value="${search.get('childTheme')} == null  ? '': ${search.get('childTheme')}"/>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
		<li>
				<ul class="toolbar">
					<a th:href="@{/sys/lib/libBookInfoAdd.html}"><li class="click"><span><img th:src="@{/static/sys/images/t01.png}" /></span>新增</li></a>
				</ul>
		</li>
		
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <th style="width: 50px;">序号</th>
		        <th>图书所属图书馆</th>
		        <th>书名</th>
		        <th>一级主题</th>
		        <th>二级主题</th>
		        <th>书籍分类</th>
		        <th>编码分类</th>
		        <th>关键字</th>
		        <th>起始年龄</th>
		        <th>结束年龄</th>
				<th>价格</th>
		        <th>封面</th>
		        <th>操作</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
				<td th:text="${itemStat.count}" ></td>
				<td th:text="${item.get('league_name')}" ></td>
					<td th:text="${item.title}" ></td>
					<td th:text="${item.pname}" ></td>
					<td th:text="${item.cname}" ></td>
					<td th:text="${item.bq}" ></td>
					<td th:text="${item.sj}" ></td>
					<td th:text="${item.keyword}" ></td>
					<td th:text="${item.start_age}" ></td>
					<td th:text="${item.end_age}" ></td>
					<td th:text="${item.price}" ></td>
					<td  class="imgtd">
							<img  th:if="${item.local_image}!=null" th:src="${imgUrl}+''+${item.local_image}" style="width: 50px;height: 50px;" />
					</td>
					<td>
						<a th:href="@{/sys/lib/bookDetailList.html(libId=${item.id})}" class="tablelink" >书本明细</a>
						<a th:href="@{/sys/lib/libBookInfoAdd.html(id=${item.id})}" class="tablelink" >修改</a>
						<a th:href="@{/sys/lib/libBookInfoSubject.html(id=${item.id})}" class="tablelink" style="color:red" >添加书籍题目</a>
				    </td>
				
			</tr>
		</tbody>
	</table>
	<!-- 分页 -->
	<div class="pagin">
    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录，当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
   	</div>
</div>
<script type="text/javascript">
	// function linkBrands(){
	// 	//获取搜索框的内容
	// 	var name = $("#findBrand").val();
	// 	//获取下拉菜单的所有选项
	// 	var getSelect = $("#brand option");
	// 	//当搜索框的内容为空时，下拉菜单的选项设置为包含所有选项，并结束
	// 	if(name == null || name == ""){
	// 		getSelect.each(function(i,get){
	// 			$(get).show();
	// 		});
	// 		return;
	// 	}
	// 	//当搜索框内容不为空时，遍历整个下拉菜单的选项
	// 	getSelect.each(function(i,get){
	// 		//当下拉菜单每一条选项的text()属性（即显示的值）包含搜索框的内容时，保留该条选选项
	// 		if($(get).text().indexOf(name) > -1){
	// 			$(get).show();
	// 		}else{
	// 			//当不包含搜索框的内容时，隐藏该条选选项（选项仍存在，只是不可见）
	// 			$(get).hide();
	// 		}
	// 	});
	// }
</script>
</body>
</html>