88 lines
3.2 KiB
HTML
88 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
|
<meta http-equiv="keywords" content=""/>
|
|
<meta name="author" content="ZhangWeiJian"/>
|
|
<link rel="stylesheet" type="text/css" href="../static/css/library.css" />
|
|
<script type="text/javascript" src="../static/scripts/jquery.js"></script>
|
|
<title>图书列表</title>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="nav">
|
|
{% if is_staff %}
|
|
<a href="/main" class="bookLib">管理员中心</a>
|
|
{% else %}
|
|
<a href="/main" class="bookLib">用户中心</a>
|
|
{% endif %}
|
|
<a href="/viewBook/?bookLikeName=&mode=simple&startPage=1&offset=10" class="bookLib">图书库</a>
|
|
</div>
|
|
<div class="currentUser">
|
|
<div>
|
|
<span class="staffId"><strong>{{currentUser.userId}}</strong></span>
|
|
{% if is_staff %}
|
|
管理员
|
|
{% else %}
|
|
用户
|
|
{% endif %}
|
|
<br/>
|
|
<span class="staffName"><strong>{{currentUser.userName}}</strong></span><br/>
|
|
<a href="/logoutView" class="logout">登出</a>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
<form class="searchArea" action="/viewBook/" method="get">
|
|
<input class="inputArea" name="bookLikeName" type="text"/>
|
|
<input name="mode" value="simple" type="hidden"/>
|
|
<input name="startPage" value="1" type="hidden"/>
|
|
<input name="offset" value="10" type="hidden"/>
|
|
<button class="searchBtn">Search...</button>
|
|
</form>
|
|
<div class="bookList">
|
|
{% for book in bookList %}
|
|
<div class="book">
|
|
<div class="hover hid"></div>
|
|
<div class="bookMain">
|
|
<div>
|
|
<input class="id" value={{book.bookId}} type="hidden"/>
|
|
<span class="bookName"><strong>{{book.bookName}}</strong></span>
|
|
<span class="bookType">{{book.bookType}}</span>
|
|
</div>
|
|
<div>
|
|
<span class="bookPublisher">{{book.bookPublisher}}</span>
|
|
<span class="bookAuthor">{{book.bookAuthor}}</span>
|
|
</div>
|
|
<div>
|
|
<span class="bookPrice fail">{{book.bookPrice}}$</span>
|
|
{% if book.bookNum %}
|
|
库存:<span class="bookNum success">{{book.bookNum}}</span>
|
|
{% else %}
|
|
库存:<span class="bookNum fail"><strong>0</strong></span>
|
|
{% endif %}
|
|
</div>
|
|
<p class="intro">{{book.bookIntroduction}}</p>
|
|
</div>
|
|
</div>
|
|
<div></div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="pageListBox">
|
|
{% if currentPage != 1 %}
|
|
<a href="/viewBook/?bookLikeName={{bookLikeName}}&mode=simple&startPage={{prevPage}}&offset=10" class="prev pageBtn">上一页</a>
|
|
{% endif %}
|
|
{% for i in pageList %}
|
|
{% if i == currentPage %}
|
|
<a href="/viewBook/?bookLikeName={{bookLikeName}}&mode=simple&startPage={{i}}&offset=10" class="pageBtn active">{{i}}</a>
|
|
{% else %}
|
|
<a href="/viewBook/?bookLikeName={{bookLikeName}}&mode=simple&startPage={{i}}&offset=10" class="pageBtn">{{i}}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if currentPage != endPage %}
|
|
<a href="/viewBook/?bookLikeName={{bookLikeName}}&mode=simple&startPage={{nextPage}}&offset=10" class="next pageBtn">下一页</a>{{page_range}}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" src="../static/scripts/library.js"></script>
|
|
</body>
|
|
</html> |