+chinese
This commit is contained in:
@@ -2,18 +2,18 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><c:out value="${formTitle}" /> - MZH Library</title>
|
||||
<title><c:out value="${formTitle}" /> - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="form-panel" aria-labelledby="user-form-title">
|
||||
<p class="eyebrow">Administration</p>
|
||||
<p class="eyebrow">系统管理</p>
|
||||
<h1 id="user-form-title"><c:out value="${formTitle}" /></h1>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<div class="form-grid">
|
||||
<div class="form-field">
|
||||
<label for="username">Username</label>
|
||||
<label for="username">用户名</label>
|
||||
<c:choose>
|
||||
<c:when test="${user.id > 0}">
|
||||
<input id="username" type="text" value="${fn:escapeXml(usernameValue)}" disabled>
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="displayName">Display name</label>
|
||||
<label for="displayName">显示名称</label>
|
||||
<input id="displayName" name="displayName" type="text"
|
||||
value="${fn:escapeXml(displayNameValue)}" required>
|
||||
<c:if test="${not empty errors.displayName}">
|
||||
@@ -60,9 +60,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="role">Role</label>
|
||||
<label for="role">角色</label>
|
||||
<select id="role" name="role" required>
|
||||
<option value="">Select role</option>
|
||||
<option value="">请选择角色</option>
|
||||
<c:forEach var="role" items="${roles}">
|
||||
<option value="${role.code}" <c:if test="${roleValue == role.code}">selected</c:if>>
|
||||
<c:out value="${role.displayName}" />
|
||||
@@ -75,13 +75,13 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="active">Active state</label>
|
||||
<label for="active">启用状态</label>
|
||||
<select id="active" name="active" required>
|
||||
<option value="true" <c:if test="${activeValue == true or activeValue == 'true'}">selected</c:if>>
|
||||
Active
|
||||
启用
|
||||
</option>
|
||||
<option value="false" <c:if test="${activeValue == false or activeValue == 'false'}">selected</c:if>>
|
||||
Inactive
|
||||
停用
|
||||
</option>
|
||||
</select>
|
||||
<c:if test="${not empty errors.active}">
|
||||
@@ -92,8 +92,8 @@
|
||||
<div class="form-field">
|
||||
<label for="password">
|
||||
<c:choose>
|
||||
<c:when test="${user.id > 0}">New password</c:when>
|
||||
<c:otherwise>Password</c:otherwise>
|
||||
<c:when test="${user.id > 0}">新密码</c:when>
|
||||
<c:otherwise>密码</c:otherwise>
|
||||
</c:choose>
|
||||
</label>
|
||||
<c:choose>
|
||||
@@ -111,8 +111,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="button button-primary" type="submit">Save</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">Cancel</a>
|
||||
<button class="button button-primary" type="submit">保存</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Manage Users - MZH Library</title>
|
||||
<title>用户管理 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -14,11 +14,11 @@
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="manage-users-title">
|
||||
<div>
|
||||
<p class="eyebrow">Administration</p>
|
||||
<h1 id="manage-users-title">Manage users</h1>
|
||||
<p>Create, update, deactivate, and review administrator, librarian, and reader accounts.</p>
|
||||
<p class="eyebrow">系统管理</p>
|
||||
<h1 id="manage-users-title">管理用户</h1>
|
||||
<p>创建、更新、停用和查看管理员、馆员与读者账户。</p>
|
||||
</div>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/admin/users/new">New user</a>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/admin/users/new">新增用户</a>
|
||||
</section>
|
||||
|
||||
<c:if test="${not empty successMessage}">
|
||||
@@ -32,10 +32,10 @@
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<section class="toolbar-panel" aria-label="User management search">
|
||||
<section class="toolbar-panel" aria-label="用户管理检索">
|
||||
<form class="search-form" action="${pageContext.request.contextPath}/admin/users" method="get">
|
||||
<div class="search-field">
|
||||
<label for="keyword">Keyword</label>
|
||||
<label for="keyword">关键词</label>
|
||||
<input id="keyword" name="keyword" type="text" value="${fn:escapeXml(criteria.keyword)}">
|
||||
<c:if test="${not empty errors.keyword}">
|
||||
<span class="field-error"><c:out value="${errors.keyword}" /></span>
|
||||
@@ -43,9 +43,9 @@
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="role">Role</label>
|
||||
<label for="role">角色</label>
|
||||
<select id="role" name="role">
|
||||
<option value="">All roles</option>
|
||||
<option value="">全部角色</option>
|
||||
<c:forEach var="role" items="${roles}">
|
||||
<option value="${role.code}" <c:if test="${criteria.roleCode == role.code}">selected</c:if>>
|
||||
<c:out value="${role.displayName}" />
|
||||
@@ -58,40 +58,40 @@
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="active">Active state</label>
|
||||
<label for="active">启用状态</label>
|
||||
<select id="active" name="active">
|
||||
<option value="">All states</option>
|
||||
<option value="active" <c:if test="${criteria.activeStatus == 'active'}">selected</c:if>>Active</option>
|
||||
<option value="inactive" <c:if test="${criteria.activeStatus == 'inactive'}">selected</c:if>>Inactive</option>
|
||||
<option value="">全部状态</option>
|
||||
<option value="active" <c:if test="${criteria.activeStatus == 'active'}">selected</c:if>>启用</option>
|
||||
<option value="inactive" <c:if test="${criteria.activeStatus == 'inactive'}">selected</c:if>>停用</option>
|
||||
</select>
|
||||
<c:if test="${not empty errors.active}">
|
||||
<span class="field-error"><c:out value="${errors.active}" /></span>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Search</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">Clear</a>
|
||||
<button class="button button-primary" type="submit">检索</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">清空</a>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="user-results-title">
|
||||
<h2 id="user-results-title">User accounts</h2>
|
||||
<h2 id="user-results-title">用户账户</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty users}">
|
||||
<p class="empty-state">No user accounts match the current filters.</p>
|
||||
<p class="empty-state">没有符合当前筛选条件的用户账户。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table user-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Username</th>
|
||||
<th scope="col">Display name</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col">State</th>
|
||||
<th scope="col">Created</th>
|
||||
<th scope="col">Updated</th>
|
||||
<th scope="col">Actions</th>
|
||||
<th scope="col">用户名</th>
|
||||
<th scope="col">显示名称</th>
|
||||
<th scope="col">角色</th>
|
||||
<th scope="col">状态</th>
|
||||
<th scope="col">创建时间</th>
|
||||
<th scope="col">更新时间</th>
|
||||
<th scope="col">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -110,17 +110,17 @@
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a class="button button-secondary"
|
||||
href="${pageContext.request.contextPath}/admin/users/edit?id=${account.id}">Edit</a>
|
||||
href="${pageContext.request.contextPath}/admin/users/edit?id=${account.id}">编辑</a>
|
||||
<c:choose>
|
||||
<c:when test="${account.id == sessionScope.authenticatedUser.id or not account.active}">
|
||||
<button class="button button-secondary" type="button" disabled>Deactivate</button>
|
||||
<button class="button button-secondary" type="button" disabled>停用</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<form action="${pageContext.request.contextPath}/admin/users/deactivate"
|
||||
method="post"
|
||||
onsubmit="return confirm('Deactivate this user account?');">
|
||||
onsubmit="return confirm('确定停用这个用户账户吗?');">
|
||||
<input type="hidden" name="id" value="${account.id}">
|
||||
<button class="button button-danger" type="submit">Deactivate</button>
|
||||
<button class="button button-danger" type="submit">停用</button>
|
||||
</form>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Login - MZH Library</title>
|
||||
<title>登录 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body class="auth-page">
|
||||
@@ -14,8 +14,8 @@
|
||||
<main class="auth-shell">
|
||||
<section class="login-panel" aria-labelledby="login-title">
|
||||
<div>
|
||||
<p class="eyebrow">Library Management</p>
|
||||
<h1 id="login-title">Sign in</h1>
|
||||
<p class="eyebrow">图书馆管理</p>
|
||||
<h1 id="login-title">登录</h1>
|
||||
</div>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<form class="login-form" action="${pageContext.request.contextPath}/login" method="post" novalidate>
|
||||
<input type="hidden" name="redirect" value="${fn:escapeXml(redirect)}">
|
||||
<label for="username">Username</label>
|
||||
<label for="username">用户名</label>
|
||||
<input id="username"
|
||||
name="username"
|
||||
type="text"
|
||||
@@ -34,14 +34,14 @@
|
||||
autocomplete="username"
|
||||
required>
|
||||
|
||||
<label for="password">Password</label>
|
||||
<label for="password">密码</label>
|
||||
<input id="password"
|
||||
name="password"
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
required>
|
||||
|
||||
<button class="button button-primary" type="submit">Sign in</button>
|
||||
<button class="button button-primary" type="submit">登录</button>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Unauthorized - MZH Library</title>
|
||||
<title>无权限 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="notice-panel" aria-labelledby="unauthorized-title">
|
||||
<h1 id="unauthorized-title">Access denied</h1>
|
||||
<h1 id="unauthorized-title">无权访问</h1>
|
||||
<p>
|
||||
<c:choose>
|
||||
<c:when test="${not empty errorMessage}">
|
||||
<c:out value="${errorMessage}" />
|
||||
</c:when>
|
||||
<c:otherwise>You do not have permission to access this page.</c:otherwise>
|
||||
<c:otherwise>您无权访问此页面。</c:otherwise>
|
||||
</c:choose>
|
||||
</p>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/dashboard">Back to dashboard</a>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/dashboard">返回控制台</a>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Catalog - MZH Library</title>
|
||||
<title>馆藏检索 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="catalog-title">
|
||||
<p class="eyebrow">Catalog</p>
|
||||
<h1 id="catalog-title">Book catalog</h1>
|
||||
<p>Search the library collection by identifier, title, author, or category.</p>
|
||||
<p class="eyebrow">馆藏</p>
|
||||
<h1 id="catalog-title">馆藏检索</h1>
|
||||
<p>按图书编号、书名、作者或分类检索馆藏。</p>
|
||||
</section>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -24,27 +24,27 @@
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<section class="toolbar-panel" aria-label="Catalog search">
|
||||
<section class="toolbar-panel" aria-label="馆藏检索">
|
||||
<form class="search-form" action="${pageContext.request.contextPath}/catalog" method="get">
|
||||
<div class="search-field">
|
||||
<label for="identifier">Book ID</label>
|
||||
<label for="identifier">图书编号</label>
|
||||
<input id="identifier" name="identifier" type="text" value="${fn:escapeXml(criteria.identifier)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="title">Title</label>
|
||||
<label for="title">书名</label>
|
||||
<input id="title" name="title" type="text" value="${fn:escapeXml(criteria.title)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="author">Author</label>
|
||||
<label for="author">作者</label>
|
||||
<input id="author" name="author" type="text" value="${fn:escapeXml(criteria.author)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="categoryId">Category</label>
|
||||
<label for="categoryId">分类</label>
|
||||
<select id="categoryId" name="categoryId">
|
||||
<option value="">All categories</option>
|
||||
<option value="">全部分类</option>
|
||||
<c:forEach var="category" items="${categories}">
|
||||
<option value="${category.id}" <c:if test="${criteria.categoryId == category.id}">selected</c:if>>
|
||||
<c:out value="${category.name}" />
|
||||
@@ -56,31 +56,31 @@
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Search</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">Clear</a>
|
||||
<button class="button button-primary" type="submit">检索</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">清空</a>
|
||||
<c:if test="${canManageBooks}">
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">Manage books</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">管理图书</a>
|
||||
</c:if>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="catalog-results-title">
|
||||
<h2 id="catalog-results-title">Results</h2>
|
||||
<h2 id="catalog-results-title">检索结果</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty books}">
|
||||
<p class="empty-state">No books match the current filters.</p>
|
||||
<p class="empty-state">没有符合当前筛选条件的图书。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Book ID</th>
|
||||
<th scope="col">Title</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Category</th>
|
||||
<th scope="col">Copies</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">图书编号</th>
|
||||
<th scope="col">书名</th>
|
||||
<th scope="col">作者</th>
|
||||
<th scope="col">分类</th>
|
||||
<th scope="col">馆藏数量</th>
|
||||
<th scope="col">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Manage Categories - MZH Library</title>
|
||||
<title>分类管理 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -13,13 +13,13 @@
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="category-title">
|
||||
<div>
|
||||
<p class="eyebrow">Book Management</p>
|
||||
<h1 id="category-title">Manage categories</h1>
|
||||
<p>Maintain catalog groupings used by book records and search filters.</p>
|
||||
<p class="eyebrow">图书管理</p>
|
||||
<h1 id="category-title">管理分类</h1>
|
||||
<p>维护图书记录和检索筛选使用的馆藏分组。</p>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/book-categories/new">New category</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">Manage books</a>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/book-categories/new">新增分类</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">管理图书</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -35,19 +35,19 @@
|
||||
</c:if>
|
||||
|
||||
<section class="table-panel" aria-labelledby="category-results-title">
|
||||
<h2 id="category-results-title">Category records</h2>
|
||||
<h2 id="category-results-title">分类记录</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty categories}">
|
||||
<p class="empty-state">No categories have been created yet.</p>
|
||||
<p class="empty-state">尚未创建分类。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table category-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col">Actions</th>
|
||||
<th scope="col">名称</th>
|
||||
<th scope="col">说明</th>
|
||||
<th scope="col">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -57,7 +57,7 @@
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${empty category.description}">
|
||||
<span class="muted-text">No description</span>
|
||||
<span class="muted-text">无说明</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="${category.description}" />
|
||||
@@ -67,12 +67,12 @@
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a class="button button-secondary"
|
||||
href="${pageContext.request.contextPath}/book-categories/edit?id=${category.id}">Edit</a>
|
||||
href="${pageContext.request.contextPath}/book-categories/edit?id=${category.id}">编辑</a>
|
||||
<form action="${pageContext.request.contextPath}/book-categories/delete"
|
||||
method="post"
|
||||
onsubmit="return confirm('Delete this category?');">
|
||||
onsubmit="return confirm('确定删除这个分类吗?');">
|
||||
<input type="hidden" name="id" value="${category.id}">
|
||||
<button class="button button-danger" type="submit">Delete</button>
|
||||
<button class="button button-danger" type="submit">删除</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><c:out value="${formTitle}" /> - MZH Library</title>
|
||||
<title><c:out value="${formTitle}" /> - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="form-panel" aria-labelledby="category-form-title">
|
||||
<p class="eyebrow">Book Management</p>
|
||||
<p class="eyebrow">图书管理</p>
|
||||
<h1 id="category-form-title"><c:out value="${formTitle}" /></h1>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div class="form-grid">
|
||||
<div class="form-field">
|
||||
<label for="name">Category name</label>
|
||||
<label for="name">分类名称</label>
|
||||
<input id="name" name="name" type="text" value="${fn:escapeXml(nameValue)}" required>
|
||||
<c:if test="${not empty errors.name}">
|
||||
<span class="field-error"><c:out value="${errors.name}" /></span>
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field form-field-wide">
|
||||
<label for="description">Description</label>
|
||||
<label for="description">说明</label>
|
||||
<textarea id="description" name="description" rows="4">${fn:escapeXml(descriptionValue)}</textarea>
|
||||
<c:if test="${not empty errors.description}">
|
||||
<span class="field-error"><c:out value="${errors.description}" /></span>
|
||||
@@ -56,8 +56,8 @@
|
||||
</c:if>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="button button-primary" type="submit">Save</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">Cancel</a>
|
||||
<button class="button button-primary" type="submit">保存</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><c:out value="${formTitle}" /> - MZH Library</title>
|
||||
<title><c:out value="${formTitle}" /> - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="form-panel" aria-labelledby="book-form-title">
|
||||
<p class="eyebrow">Book Management</p>
|
||||
<p class="eyebrow">图书管理</p>
|
||||
<h1 id="book-form-title"><c:out value="${formTitle}" /></h1>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<div class="form-grid">
|
||||
<div class="form-field">
|
||||
<label for="identifier">Book ID</label>
|
||||
<label for="identifier">图书编号</label>
|
||||
<input id="identifier" name="identifier" type="text" value="${fn:escapeXml(identifierValue)}" required>
|
||||
<c:if test="${not empty errors.identifier}">
|
||||
<span class="field-error"><c:out value="${errors.identifier}" /></span>
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="title">Title</label>
|
||||
<label for="title">书名</label>
|
||||
<input id="title" name="title" type="text" value="${fn:escapeXml(titleValue)}" required>
|
||||
<c:if test="${not empty errors.title}">
|
||||
<span class="field-error"><c:out value="${errors.title}" /></span>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="author">Author</label>
|
||||
<label for="author">作者</label>
|
||||
<input id="author" name="author" type="text" value="${fn:escapeXml(authorValue)}" required>
|
||||
<c:if test="${not empty errors.author}">
|
||||
<span class="field-error"><c:out value="${errors.author}" /></span>
|
||||
@@ -62,9 +62,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="categoryId">Category</label>
|
||||
<label for="categoryId">分类</label>
|
||||
<select id="categoryId" name="categoryId" required>
|
||||
<option value="">Select category</option>
|
||||
<option value="">请选择分类</option>
|
||||
<c:forEach var="category" items="${categories}">
|
||||
<option value="${category.id}" <c:if test="${categoryValue == category.id}">selected</c:if>>
|
||||
<c:out value="${category.name}" />
|
||||
@@ -77,7 +77,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="totalCopies">Total copies</label>
|
||||
<label for="totalCopies">馆藏总数</label>
|
||||
<input id="totalCopies" name="totalCopies" type="number" min="0" value="${fn:escapeXml(totalCopiesValue)}" required>
|
||||
<c:if test="${not empty errors.totalCopies}">
|
||||
<span class="field-error"><c:out value="${errors.totalCopies}" /></span>
|
||||
@@ -85,7 +85,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="availableCopies">Available copies</label>
|
||||
<label for="availableCopies">可借数量</label>
|
||||
<input id="availableCopies" name="availableCopies" type="number" min="0" value="${fn:escapeXml(availableCopiesValue)}" required>
|
||||
<c:if test="${not empty errors.availableCopies}">
|
||||
<span class="field-error"><c:out value="${errors.availableCopies}" /></span>
|
||||
@@ -93,9 +93,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="status">Status</label>
|
||||
<label for="status">状态</label>
|
||||
<select id="status" name="status" required>
|
||||
<option value="">Select status</option>
|
||||
<option value="">请选择状态</option>
|
||||
<c:forEach var="status" items="${statuses}">
|
||||
<option value="${status.code}" <c:if test="${statusValue == status.code}">selected</c:if>>
|
||||
<c:out value="${status.displayName}" />
|
||||
@@ -109,8 +109,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="button button-primary" type="submit">Save</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">Cancel</a>
|
||||
<button class="button button-primary" type="submit">保存</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Manage Books - MZH Library</title>
|
||||
<title>图书管理 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="manage-title">
|
||||
<p class="eyebrow">Book Management</p>
|
||||
<h1 id="manage-title">Manage books</h1>
|
||||
<p>Create, update, delete, and review inventory for catalog records.</p>
|
||||
<p class="eyebrow">图书管理</p>
|
||||
<h1 id="manage-title">管理图书</h1>
|
||||
<p>创建、更新、删除和查看馆藏记录的库存信息。</p>
|
||||
<div class="hero-actions">
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/books/new">New book</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">Categories</a>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/books/new">新增图书</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">分类</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -33,27 +33,27 @@
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<section class="toolbar-panel" aria-label="Book management search">
|
||||
<section class="toolbar-panel" aria-label="图书管理检索">
|
||||
<form class="search-form" action="${pageContext.request.contextPath}/books" method="get">
|
||||
<div class="search-field">
|
||||
<label for="identifier">Book ID</label>
|
||||
<label for="identifier">图书编号</label>
|
||||
<input id="identifier" name="identifier" type="text" value="${fn:escapeXml(criteria.identifier)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="title">Title</label>
|
||||
<label for="title">书名</label>
|
||||
<input id="title" name="title" type="text" value="${fn:escapeXml(criteria.title)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="author">Author</label>
|
||||
<label for="author">作者</label>
|
||||
<input id="author" name="author" type="text" value="${fn:escapeXml(criteria.author)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="categoryId">Category</label>
|
||||
<label for="categoryId">分类</label>
|
||||
<select id="categoryId" name="categoryId">
|
||||
<option value="">All categories</option>
|
||||
<option value="">全部分类</option>
|
||||
<c:forEach var="category" items="${categories}">
|
||||
<option value="${category.id}" <c:if test="${criteria.categoryId == category.id}">selected</c:if>>
|
||||
<c:out value="${category.name}" />
|
||||
@@ -65,31 +65,31 @@
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Search</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">Clear</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">View catalog</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">Categories</a>
|
||||
<button class="button button-primary" type="submit">检索</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">清空</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">查看馆藏</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">分类</a>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="management-results-title">
|
||||
<h2 id="management-results-title">Book records</h2>
|
||||
<h2 id="management-results-title">图书记录</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty books}">
|
||||
<p class="empty-state">No book records match the current filters.</p>
|
||||
<p class="empty-state">没有符合当前筛选条件的图书记录。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Book ID</th>
|
||||
<th scope="col">Title</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Category</th>
|
||||
<th scope="col">Copies</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Actions</th>
|
||||
<th scope="col">图书编号</th>
|
||||
<th scope="col">书名</th>
|
||||
<th scope="col">作者</th>
|
||||
<th scope="col">分类</th>
|
||||
<th scope="col">馆藏数量</th>
|
||||
<th scope="col">状态</th>
|
||||
<th scope="col">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -108,12 +108,12 @@
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a class="button button-secondary"
|
||||
href="${pageContext.request.contextPath}/books/edit?id=${book.id}">Edit</a>
|
||||
href="${pageContext.request.contextPath}/books/edit?id=${book.id}">编辑</a>
|
||||
<form action="${pageContext.request.contextPath}/books/delete"
|
||||
method="post"
|
||||
onsubmit="return confirm('Delete this book record?');">
|
||||
onsubmit="return confirm('确定删除这条图书记录吗?');">
|
||||
<input type="hidden" name="id" value="${book.id}">
|
||||
<button class="button button-danger" type="submit">Delete</button>
|
||||
<button class="button button-danger" type="submit">删除</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>New Borrow - MZH Library</title>
|
||||
<title>新增借阅 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="form-panel" aria-labelledby="borrow-form-title">
|
||||
<p class="eyebrow">Borrowing Management</p>
|
||||
<h1 id="borrow-form-title">New borrow</h1>
|
||||
<p class="eyebrow">借阅管理</p>
|
||||
<h1 id="borrow-form-title">新增借阅</h1>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
<div class="message message-error" role="alert">
|
||||
@@ -28,7 +28,7 @@
|
||||
<form class="borrow-form" action="${pageContext.request.contextPath}/borrowing/create" method="post" novalidate>
|
||||
<div class="form-grid">
|
||||
<div class="form-field">
|
||||
<label for="readerIdentifier">Reader ID</label>
|
||||
<label for="readerIdentifier">读者编号</label>
|
||||
<input id="readerIdentifier" name="readerIdentifier" type="text"
|
||||
value="${fn:escapeXml(readerIdentifierValue)}" required>
|
||||
<c:if test="${not empty errors.readerIdentifier}">
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="bookIdentifier">Book ID</label>
|
||||
<label for="bookIdentifier">图书编号</label>
|
||||
<input id="bookIdentifier" name="bookIdentifier" type="text"
|
||||
value="${fn:escapeXml(bookIdentifierValue)}" required>
|
||||
<c:if test="${not empty errors.bookIdentifier}">
|
||||
@@ -47,8 +47,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="button button-primary" type="submit">Borrow</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">Cancel</a>
|
||||
<button class="button button-primary" type="submit">借出</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Borrowing Management - MZH Library</title>
|
||||
<title>借阅管理 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -14,11 +14,11 @@
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="borrowing-title">
|
||||
<div>
|
||||
<p class="eyebrow">Borrowing Management</p>
|
||||
<h1 id="borrowing-title">Manage borrowing</h1>
|
||||
<p>Create borrow records, process returns, renew active loans, and review overdue items.</p>
|
||||
<p class="eyebrow">借阅管理</p>
|
||||
<h1 id="borrowing-title">管理借阅</h1>
|
||||
<p>创建借阅记录、处理归还、续借有效借阅并查看逾期项目。</p>
|
||||
</div>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/borrowing/new">New borrow</a>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/borrowing/new">新增借阅</a>
|
||||
</section>
|
||||
|
||||
<c:if test="${not empty successMessage}">
|
||||
@@ -32,31 +32,31 @@
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<section class="toolbar-panel" aria-label="Borrowing search">
|
||||
<section class="toolbar-panel" aria-label="借阅检索">
|
||||
<form class="search-form borrowing-search-form" action="${pageContext.request.contextPath}/borrowing" method="get">
|
||||
<div class="search-field">
|
||||
<label for="readerIdentifier">Reader ID</label>
|
||||
<label for="readerIdentifier">读者编号</label>
|
||||
<input id="readerIdentifier" name="readerIdentifier" type="text"
|
||||
value="${fn:escapeXml(criteria.readerIdentifier)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="bookIdentifier">Book ID</label>
|
||||
<label for="bookIdentifier">图书编号</label>
|
||||
<input id="bookIdentifier" name="bookIdentifier" type="text"
|
||||
value="${fn:escapeXml(criteria.bookIdentifier)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="status">Status</label>
|
||||
<label for="status">状态</label>
|
||||
<select id="status" name="status">
|
||||
<option value="">All statuses</option>
|
||||
<option value="">全部状态</option>
|
||||
<c:forEach var="status" items="${statuses}">
|
||||
<option value="${status.code}" <c:if test="${criteria.statusCode == status.code}">selected</c:if>>
|
||||
<c:out value="${status.displayName}" />
|
||||
</option>
|
||||
</c:forEach>
|
||||
<option value="${overdueStatus}" <c:if test="${criteria.statusCode == overdueStatus}">selected</c:if>>
|
||||
Overdue
|
||||
逾期
|
||||
</option>
|
||||
</select>
|
||||
<c:if test="${not empty errors.status}">
|
||||
@@ -64,30 +64,30 @@
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Search</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">Clear</a>
|
||||
<button class="button button-primary" type="submit">检索</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">清空</a>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="borrowing-results-title">
|
||||
<h2 id="borrowing-results-title">Borrowing records</h2>
|
||||
<h2 id="borrowing-results-title">借阅记录</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty borrowRecords}">
|
||||
<p class="empty-state">No borrowing records match the current filters.</p>
|
||||
<p class="empty-state">没有符合当前筛选条件的借阅记录。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table borrowing-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Reader</th>
|
||||
<th scope="col">Book</th>
|
||||
<th scope="col">Borrowed</th>
|
||||
<th scope="col">Due</th>
|
||||
<th scope="col">Returned</th>
|
||||
<th scope="col">Renewals</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Actions</th>
|
||||
<th scope="col">读者</th>
|
||||
<th scope="col">图书</th>
|
||||
<th scope="col">借出时间</th>
|
||||
<th scope="col">应还时间</th>
|
||||
<th scope="col">归还时间</th>
|
||||
<th scope="col">续借次数</th>
|
||||
<th scope="col">状态</th>
|
||||
<th scope="col">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -108,7 +108,7 @@
|
||||
<c:when test="${not empty record.returnedAtText}">
|
||||
<c:out value="${record.returnedAtText}" />
|
||||
</c:when>
|
||||
<c:otherwise>Not returned</c:otherwise>
|
||||
<c:otherwise>未归还</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td><c:out value="${record.renewalCount}" /> / <c:out value="${maxRenewals}" /></td>
|
||||
@@ -123,22 +123,22 @@
|
||||
<div class="table-actions">
|
||||
<form action="${pageContext.request.contextPath}/borrowing/return"
|
||||
method="post"
|
||||
onsubmit="return confirm('Return this book?');">
|
||||
onsubmit="return confirm('确定归还这本书吗?');">
|
||||
<input type="hidden" name="id" value="${record.id}">
|
||||
<button class="button button-secondary" type="submit">Return</button>
|
||||
<button class="button button-secondary" type="submit">归还</button>
|
||||
</form>
|
||||
<c:if test="${record.renewalCount < maxRenewals}">
|
||||
<form action="${pageContext.request.contextPath}/borrowing/renew"
|
||||
method="post"
|
||||
onsubmit="return confirm('Renew this loan?');">
|
||||
onsubmit="return confirm('确定续借这条记录吗?');">
|
||||
<input type="hidden" name="id" value="${record.id}">
|
||||
<button class="button button-secondary" type="submit">Renew</button>
|
||||
<button class="button button-secondary" type="submit">续借</button>
|
||||
</form>
|
||||
</c:if>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="muted-text">Complete</span>
|
||||
<span class="muted-text">已完成</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<header class="app-header">
|
||||
<a class="brand" href="${pageContext.request.contextPath}/dashboard">MZH Library</a>
|
||||
<a class="brand" href="${pageContext.request.contextPath}/dashboard">MZH 图书馆</a>
|
||||
<c:if test="${not empty sessionScope.authenticatedUser}">
|
||||
<nav class="top-nav" aria-label="Primary">
|
||||
<a href="${pageContext.request.contextPath}/dashboard">Dashboard</a>
|
||||
<a href="${pageContext.request.contextPath}/catalog">Catalog</a>
|
||||
<nav class="top-nav" aria-label="主导航">
|
||||
<a href="${pageContext.request.contextPath}/dashboard">控制台</a>
|
||||
<a href="${pageContext.request.contextPath}/catalog">馆藏检索</a>
|
||||
<c:if test="${sessionScope.userRole == 'administrator'}">
|
||||
<a href="${pageContext.request.contextPath}/admin/home">Admin</a>
|
||||
<a href="${pageContext.request.contextPath}/admin/users">Users</a>
|
||||
<a href="${pageContext.request.contextPath}/admin/system-logs">Logs</a>
|
||||
<a href="${pageContext.request.contextPath}/admin/home">管理</a>
|
||||
<a href="${pageContext.request.contextPath}/admin/users">用户</a>
|
||||
<a href="${pageContext.request.contextPath}/admin/system-logs">日志</a>
|
||||
</c:if>
|
||||
<c:if test="${sessionScope.userRole == 'administrator' or sessionScope.userRole == 'librarian'}">
|
||||
<a href="${pageContext.request.contextPath}/librarian/home">Librarian</a>
|
||||
<a href="${pageContext.request.contextPath}/books">Books</a>
|
||||
<a href="${pageContext.request.contextPath}/book-categories">Categories</a>
|
||||
<a href="${pageContext.request.contextPath}/readers">Readers</a>
|
||||
<a href="${pageContext.request.contextPath}/borrowing">Borrowing</a>
|
||||
<a href="${pageContext.request.contextPath}/reports">Reports</a>
|
||||
<a href="${pageContext.request.contextPath}/librarian/home">馆员</a>
|
||||
<a href="${pageContext.request.contextPath}/books">图书</a>
|
||||
<a href="${pageContext.request.contextPath}/book-categories">分类</a>
|
||||
<a href="${pageContext.request.contextPath}/readers">读者</a>
|
||||
<a href="${pageContext.request.contextPath}/borrowing">借阅</a>
|
||||
<a href="${pageContext.request.contextPath}/reports">报表</a>
|
||||
</c:if>
|
||||
<a href="${pageContext.request.contextPath}/reader/home">Reader</a>
|
||||
<a href="${pageContext.request.contextPath}/reader/home">读者中心</a>
|
||||
<c:if test="${sessionScope.userRole == 'reader'}">
|
||||
<a href="${pageContext.request.contextPath}/reader/loans">My Loans</a>
|
||||
<a href="${pageContext.request.contextPath}/reader/loans">我的借阅</a>
|
||||
</c:if>
|
||||
<span class="user-pill">
|
||||
<c:out value="${sessionScope.authenticatedUser.displayName}" />
|
||||
</span>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/logout">Logout</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/logout">退出</a>
|
||||
</nav>
|
||||
</c:if>
|
||||
</header>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard - MZH Library</title>
|
||||
<title>控制台 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -15,86 +15,86 @@
|
||||
<p class="eyebrow">
|
||||
<c:out value="${sessionScope.authenticatedUser.role.displayName}" />
|
||||
</p>
|
||||
<h1 id="dashboard-title">Dashboard</h1>
|
||||
<p>Signed in as <strong><c:out value="${sessionScope.authenticatedUser.displayName}" /></strong>.</p>
|
||||
<h1 id="dashboard-title">控制台</h1>
|
||||
<p>当前登录:<strong><c:out value="${sessionScope.authenticatedUser.displayName}" /></strong></p>
|
||||
</section>
|
||||
|
||||
<section class="card-grid" aria-label="Role workspaces">
|
||||
<section class="card-grid" aria-label="角色工作区">
|
||||
<c:if test="${sessionScope.userRole == 'administrator'}">
|
||||
<article class="workspace-card">
|
||||
<h2>Administration</h2>
|
||||
<p>Account, role, permission, and system-maintenance entry point.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/home">Open</a>
|
||||
<h2>系统管理</h2>
|
||||
<p>账户、角色、权限和系统维护入口。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/home">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>User Management</h2>
|
||||
<p>Create, update, deactivate, and review login accounts.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">Open</a>
|
||||
<h2>用户管理</h2>
|
||||
<p>创建、更新、停用和查看登录账户。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>System Logs</h2>
|
||||
<p>Review read-only audit entries for account and maintenance actions.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/system-logs">Open</a>
|
||||
<h2>系统日志</h2>
|
||||
<p>查看账户与维护操作的只读审计记录。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/system-logs">打开</a>
|
||||
</article>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${sessionScope.userRole == 'administrator' or sessionScope.userRole == 'librarian'}">
|
||||
<article class="workspace-card">
|
||||
<h2>Librarian Workspace</h2>
|
||||
<p>Book, reader, borrowing, return, renewal, and overdue entry point.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/librarian/home">Open</a>
|
||||
<h2>馆员工作台</h2>
|
||||
<p>图书、读者、借阅、归还、续借和逾期处理入口。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/librarian/home">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Book Management</h2>
|
||||
<p>Create, update, delete, and review book inventory records.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">Open</a>
|
||||
<h2>图书管理</h2>
|
||||
<p>创建、更新、删除和查看图书库存记录。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Category Maintenance</h2>
|
||||
<p>Maintain catalog categories used by book records and search filters.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">Open</a>
|
||||
<h2>分类维护</h2>
|
||||
<p>维护图书记录和检索筛选使用的馆藏分类。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Reader Management</h2>
|
||||
<p>Create, update, deactivate, and review reader eligibility records.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">Open</a>
|
||||
<h2>读者管理</h2>
|
||||
<p>创建、更新、停用和查看读者借阅资格记录。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Borrowing Management</h2>
|
||||
<p>Create loans, process returns, renew active records, and review overdue items.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">Open</a>
|
||||
<h2>借阅管理</h2>
|
||||
<p>创建借阅、处理归还、续借有效记录并查看逾期项目。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">打开</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Report Center</h2>
|
||||
<p>Review inventory health, borrowing counts, overdue records, and popular books.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reports">Open</a>
|
||||
<h2>报表中心</h2>
|
||||
<p>查看库存状况、借阅统计、逾期记录和热门图书。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reports">打开</a>
|
||||
</article>
|
||||
</c:if>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Book Catalog</h2>
|
||||
<p>Search books by title, author, category, or book identifier.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">Search</a>
|
||||
<h2>馆藏检索</h2>
|
||||
<p>按书名、作者、分类或图书编号检索图书。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">检索</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Reader Center</h2>
|
||||
<p>Reader self-service entry point for catalog access and loan history.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reader/home">Open</a>
|
||||
<h2>读者中心</h2>
|
||||
<p>读者自助访问馆藏和借阅历史的入口。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reader/home">打开</a>
|
||||
</article>
|
||||
|
||||
<c:if test="${sessionScope.userRole == 'reader'}">
|
||||
<article class="workspace-card">
|
||||
<h2>My Loan History</h2>
|
||||
<p>Review your active, returned, and overdue borrowing records.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reader/loans">Open</a>
|
||||
<h2>我的借阅历史</h2>
|
||||
<p>查看您的在借、已还和逾期借阅记录。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reader/loans">打开</a>
|
||||
</article>
|
||||
</c:if>
|
||||
</section>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>System Logs - MZH Library</title>
|
||||
<title>系统日志 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -14,9 +14,9 @@
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="system-logs-title">
|
||||
<div>
|
||||
<p class="eyebrow">System Maintenance</p>
|
||||
<h1 id="system-logs-title">System logs</h1>
|
||||
<p>Review administrative account changes and maintenance audit records.</p>
|
||||
<p class="eyebrow">系统维护</p>
|
||||
<h1 id="system-logs-title">系统日志</h1>
|
||||
<p>查看管理账户变更和维护审计记录。</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -26,17 +26,22 @@
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<section class="toolbar-panel" aria-label="System log search">
|
||||
<section class="toolbar-panel" aria-label="系统日志检索">
|
||||
<form class="search-form system-log-search-form"
|
||||
action="${pageContext.request.contextPath}/admin/system-logs" method="get">
|
||||
<div class="search-field">
|
||||
<label for="operationType">Operation</label>
|
||||
<label for="operationType">操作</label>
|
||||
<select id="operationType" name="operationType">
|
||||
<option value="">All operations</option>
|
||||
<option value="">全部操作</option>
|
||||
<c:forEach var="operationType" items="${operationTypes}">
|
||||
<option value="${fn:escapeXml(operationType)}"
|
||||
<c:if test="${criteria.operationType == operationType}">selected</c:if>>
|
||||
<c:out value="${operationType}" />
|
||||
<c:choose>
|
||||
<c:when test="${operationType == 'user.create'}">创建用户</c:when>
|
||||
<c:when test="${operationType == 'user.update'}">更新用户</c:when>
|
||||
<c:when test="${operationType == 'user.deactivate'}">停用用户</c:when>
|
||||
<c:otherwise><c:out value="${operationType}" /></c:otherwise>
|
||||
</c:choose>
|
||||
</option>
|
||||
</c:forEach>
|
||||
<c:if test="${not empty criteria.operationType and empty operationTypes}">
|
||||
@@ -51,7 +56,7 @@
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="keyword">Keyword</label>
|
||||
<label for="keyword">关键词</label>
|
||||
<input id="keyword" name="keyword" type="text" value="${fn:escapeXml(criteria.keyword)}">
|
||||
<c:if test="${not empty errors.keyword}">
|
||||
<span class="field-error"><c:out value="${errors.keyword}" /></span>
|
||||
@@ -59,7 +64,7 @@
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="createdFrom">From</label>
|
||||
<label for="createdFrom">开始日期</label>
|
||||
<input id="createdFrom" name="createdFrom" type="date"
|
||||
value="${fn:escapeXml(criteria.createdFromText)}">
|
||||
<c:if test="${not empty errors.createdFrom}">
|
||||
@@ -68,7 +73,7 @@
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="createdTo">To</label>
|
||||
<label for="createdTo">结束日期</label>
|
||||
<input id="createdTo" name="createdTo" type="date"
|
||||
value="${fn:escapeXml(criteria.createdToText)}">
|
||||
<c:if test="${not empty errors.createdTo}">
|
||||
@@ -76,29 +81,29 @@
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Search</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/system-logs">Clear</a>
|
||||
<button class="button button-primary" type="submit">检索</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/system-logs">清空</a>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="system-log-results-title">
|
||||
<h2 id="system-log-results-title">Log entries</h2>
|
||||
<h2 id="system-log-results-title">日志记录</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty logs}">
|
||||
<p class="empty-state">No system logs match the current filters.</p>
|
||||
<p class="empty-state">没有符合当前筛选条件的系统日志。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table system-log-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Time</th>
|
||||
<th scope="col">Operator</th>
|
||||
<th scope="col">Operation</th>
|
||||
<th scope="col">Target</th>
|
||||
<th scope="col">Result</th>
|
||||
<th scope="col">IP address</th>
|
||||
<th scope="col">Detail</th>
|
||||
<th scope="col">时间</th>
|
||||
<th scope="col">操作人</th>
|
||||
<th scope="col">操作</th>
|
||||
<th scope="col">目标</th>
|
||||
<th scope="col">结果</th>
|
||||
<th scope="col">IP 地址</th>
|
||||
<th scope="col">详情</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -111,9 +116,16 @@
|
||||
<div class="muted-text"><c:out value="${log.operatorMetaText}" /></div>
|
||||
</c:if>
|
||||
</td>
|
||||
<td><c:out value="${log.operationType}" /></td>
|
||||
<td>
|
||||
<c:out value="${log.targetTable}" />
|
||||
<c:choose>
|
||||
<c:when test="${log.operationType == 'user.create'}">创建用户</c:when>
|
||||
<c:when test="${log.operationType == 'user.update'}">更新用户</c:when>
|
||||
<c:when test="${log.operationType == 'user.deactivate'}">停用用户</c:when>
|
||||
<c:otherwise><c:out value="${log.operationType}" /></c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${log.targetTableName}" />
|
||||
<c:if test="${not empty log.targetId}">
|
||||
#<c:out value="${log.targetId}" />
|
||||
</c:if>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Loan History - MZH Library</title>
|
||||
<title>借阅历史 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -13,11 +13,11 @@
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="loan-history-title">
|
||||
<div>
|
||||
<p class="eyebrow">Reader Center</p>
|
||||
<h1 id="loan-history-title">Loan history</h1>
|
||||
<p>Review your active, returned, and overdue borrowing records.</p>
|
||||
<p class="eyebrow">读者中心</p>
|
||||
<h1 id="loan-history-title">借阅历史</h1>
|
||||
<p>查看您的在借、已还和逾期借阅记录。</p>
|
||||
</div>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">Search catalog</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">检索馆藏</a>
|
||||
</section>
|
||||
|
||||
<c:if test="${not empty successMessage}">
|
||||
@@ -32,23 +32,23 @@
|
||||
</c:if>
|
||||
|
||||
<section class="table-panel" aria-labelledby="loan-results-title">
|
||||
<h2 id="loan-results-title">Borrowing records</h2>
|
||||
<h2 id="loan-results-title">借阅记录</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty borrowRecords}">
|
||||
<p class="empty-state">No borrowing records are available for this account.</p>
|
||||
<p class="empty-state">此账户暂无借阅记录。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table borrowing-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Book ID</th>
|
||||
<th scope="col">Title</th>
|
||||
<th scope="col">Borrowed</th>
|
||||
<th scope="col">Due</th>
|
||||
<th scope="col">Returned</th>
|
||||
<th scope="col">Renewals</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">图书编号</th>
|
||||
<th scope="col">书名</th>
|
||||
<th scope="col">借出时间</th>
|
||||
<th scope="col">应还时间</th>
|
||||
<th scope="col">归还时间</th>
|
||||
<th scope="col">续借次数</th>
|
||||
<th scope="col">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -63,7 +63,7 @@
|
||||
<c:when test="${not empty record.returnedAtText}">
|
||||
<c:out value="${record.returnedAtText}" />
|
||||
</c:when>
|
||||
<c:otherwise>Not returned</c:otherwise>
|
||||
<c:otherwise>未归还</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td><c:out value="${record.renewalCount}" /></td>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><c:out value="${formTitle}" /> - MZH Library</title>
|
||||
<title><c:out value="${formTitle}" /> - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="form-panel" aria-labelledby="reader-form-title">
|
||||
<p class="eyebrow">Reader Management</p>
|
||||
<p class="eyebrow">读者管理</p>
|
||||
<h1 id="reader-form-title"><c:out value="${formTitle}" /></h1>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<div class="form-grid">
|
||||
<div class="form-field">
|
||||
<label for="identifier">Reader ID</label>
|
||||
<label for="identifier">读者编号</label>
|
||||
<input id="identifier" name="identifier" type="text" value="${fn:escapeXml(identifierValue)}" required>
|
||||
<c:if test="${not empty errors.identifier}">
|
||||
<span class="field-error"><c:out value="${errors.identifier}" /></span>
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="fullName">Full name</label>
|
||||
<label for="fullName">姓名</label>
|
||||
<input id="fullName" name="fullName" type="text" value="${fn:escapeXml(fullNameValue)}" required>
|
||||
<c:if test="${not empty errors.fullName}">
|
||||
<span class="field-error"><c:out value="${errors.fullName}" /></span>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="phone">Phone</label>
|
||||
<label for="phone">电话</label>
|
||||
<input id="phone" name="phone" type="tel" value="${fn:escapeXml(phoneValue)}">
|
||||
<c:if test="${not empty errors.phone}">
|
||||
<span class="field-error"><c:out value="${errors.phone}" /></span>
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="email">Email</label>
|
||||
<label for="email">邮箱</label>
|
||||
<input id="email" name="email" type="email" value="${fn:escapeXml(emailValue)}">
|
||||
<c:if test="${not empty errors.email}">
|
||||
<span class="field-error"><c:out value="${errors.email}" /></span>
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="userId">Linked account ID</label>
|
||||
<label for="userId">关联账户 ID</label>
|
||||
<input id="userId" name="userId" type="number" min="1" value="${fn:escapeXml(userIdValue)}">
|
||||
<c:if test="${not empty errors.userId}">
|
||||
<span class="field-error"><c:out value="${errors.userId}" /></span>
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="maxBorrowCount">Max borrow count</label>
|
||||
<label for="maxBorrowCount">最大借阅数量</label>
|
||||
<input id="maxBorrowCount" name="maxBorrowCount" type="number" min="1" max="50"
|
||||
value="${fn:escapeXml(maxBorrowCountValue)}" required>
|
||||
<c:if test="${not empty errors.maxBorrowCount}">
|
||||
@@ -87,9 +87,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="status">Status</label>
|
||||
<label for="status">状态</label>
|
||||
<select id="status" name="status" required>
|
||||
<option value="">Select status</option>
|
||||
<option value="">请选择状态</option>
|
||||
<c:forEach var="status" items="${statuses}">
|
||||
<option value="${status.code}" <c:if test="${statusValue == status.code}">selected</c:if>>
|
||||
<c:out value="${status.displayName}" />
|
||||
@@ -103,8 +103,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="button button-primary" type="submit">Save</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">Cancel</a>
|
||||
<button class="button button-primary" type="submit">保存</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Manage Readers - MZH Library</title>
|
||||
<title>读者管理 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/jsp/common/header.jspf" %>
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="manage-readers-title">
|
||||
<p class="eyebrow">Reader Management</p>
|
||||
<h1 id="manage-readers-title">Manage readers</h1>
|
||||
<p>Create, update, and review reader eligibility and contact records.</p>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/readers/new">New reader</a>
|
||||
<p class="eyebrow">读者管理</p>
|
||||
<h1 id="manage-readers-title">管理读者</h1>
|
||||
<p>创建、更新和查看读者资格及联系方式记录。</p>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/readers/new">新增读者</a>
|
||||
</section>
|
||||
|
||||
<c:if test="${not empty successMessage}">
|
||||
@@ -30,27 +30,27 @@
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<section class="toolbar-panel" aria-label="Reader management search">
|
||||
<section class="toolbar-panel" aria-label="读者管理检索">
|
||||
<form class="search-form" action="${pageContext.request.contextPath}/readers" method="get">
|
||||
<div class="search-field">
|
||||
<label for="identifier">Reader ID</label>
|
||||
<label for="identifier">读者编号</label>
|
||||
<input id="identifier" name="identifier" type="text" value="${fn:escapeXml(criteria.identifier)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="name">Name</label>
|
||||
<label for="name">姓名</label>
|
||||
<input id="name" name="name" type="text" value="${fn:escapeXml(criteria.name)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="contact">Phone or email</label>
|
||||
<label for="contact">电话或邮箱</label>
|
||||
<input id="contact" name="contact" type="text" value="${fn:escapeXml(criteria.contact)}">
|
||||
</div>
|
||||
|
||||
<div class="search-field">
|
||||
<label for="status">Status</label>
|
||||
<label for="status">状态</label>
|
||||
<select id="status" name="status">
|
||||
<option value="">All statuses</option>
|
||||
<option value="">全部状态</option>
|
||||
<c:forEach var="status" items="${statuses}">
|
||||
<option value="${status.code}" <c:if test="${criteria.statusCode == status.code}">selected</c:if>>
|
||||
<c:out value="${status.displayName}" />
|
||||
@@ -62,29 +62,29 @@
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<button class="button button-primary" type="submit">Search</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">Clear</a>
|
||||
<button class="button button-primary" type="submit">检索</button>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">清空</a>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="reader-results-title">
|
||||
<h2 id="reader-results-title">Reader records</h2>
|
||||
<h2 id="reader-results-title">读者记录</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty readers}">
|
||||
<p class="empty-state">No reader records match the current filters.</p>
|
||||
<p class="empty-state">没有符合当前筛选条件的读者记录。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Reader ID</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Contact</th>
|
||||
<th scope="col">Account</th>
|
||||
<th scope="col">Borrow limit</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Actions</th>
|
||||
<th scope="col">读者编号</th>
|
||||
<th scope="col">姓名</th>
|
||||
<th scope="col">联系方式</th>
|
||||
<th scope="col">关联账户</th>
|
||||
<th scope="col">借阅上限</th>
|
||||
<th scope="col">状态</th>
|
||||
<th scope="col">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -105,7 +105,7 @@
|
||||
<c:when test="${not empty reader.username}">
|
||||
<c:out value="${reader.username}" />
|
||||
</c:when>
|
||||
<c:otherwise>Unlinked</c:otherwise>
|
||||
<c:otherwise>未关联</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td><c:out value="${reader.maxBorrowCount}" /></td>
|
||||
@@ -117,12 +117,12 @@
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a class="button button-secondary"
|
||||
href="${pageContext.request.contextPath}/readers/edit?id=${reader.id}">Edit</a>
|
||||
href="${pageContext.request.contextPath}/readers/edit?id=${reader.id}">编辑</a>
|
||||
<form action="${pageContext.request.contextPath}/readers/delete"
|
||||
method="post"
|
||||
onsubmit="return confirm('Deactivate this reader profile?');">
|
||||
onsubmit="return confirm('确定停用这个读者档案吗?');">
|
||||
<input type="hidden" name="id" value="${reader.id}">
|
||||
<button class="button button-danger" type="submit">Deactivate</button>
|
||||
<button class="button button-danger" type="submit">停用</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Reports - MZH Library</title>
|
||||
<title>报表 - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -13,11 +13,11 @@
|
||||
<main class="page-shell">
|
||||
<section class="dashboard-hero catalog-hero" aria-labelledby="reports-title">
|
||||
<div>
|
||||
<p class="eyebrow">Reports</p>
|
||||
<h1 id="reports-title">Report center</h1>
|
||||
<p>Review collection inventory, borrowing health, overdue loans, and popular books.</p>
|
||||
<p class="eyebrow">报表</p>
|
||||
<h1 id="reports-title">报表中心</h1>
|
||||
<p>查看馆藏库存、借阅状况、逾期借阅和热门图书。</p>
|
||||
</div>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">Borrowing records</a>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">借阅记录</a>
|
||||
</section>
|
||||
|
||||
<c:if test="${not empty errorMessage}">
|
||||
@@ -27,59 +27,59 @@
|
||||
</c:if>
|
||||
|
||||
<c:if test="${not empty reportCenter}">
|
||||
<section class="report-grid" aria-label="Report summary">
|
||||
<section class="report-grid" aria-label="报表摘要">
|
||||
<article class="report-card">
|
||||
<p class="eyebrow">Inventory</p>
|
||||
<h2>Total titles</h2>
|
||||
<p class="eyebrow">库存</p>
|
||||
<h2>图书种类总数</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.inventorySummary.totalTitles}" /></p>
|
||||
</article>
|
||||
<article class="report-card">
|
||||
<p class="eyebrow">Inventory</p>
|
||||
<h2>Total copies</h2>
|
||||
<p class="eyebrow">库存</p>
|
||||
<h2>馆藏总册数</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.inventorySummary.totalCopies}" /></p>
|
||||
</article>
|
||||
<article class="report-card">
|
||||
<p class="eyebrow">Inventory</p>
|
||||
<h2>Available copies</h2>
|
||||
<p class="eyebrow">库存</p>
|
||||
<h2>可借册数</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.inventorySummary.availableCopies}" /></p>
|
||||
</article>
|
||||
<article class="report-card">
|
||||
<p class="eyebrow">Attention</p>
|
||||
<h2>Unavailable or empty</h2>
|
||||
<p class="eyebrow">需关注</p>
|
||||
<h2>不可借或无库存</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.inventorySummary.unavailableOrEmptyTitles}" /></p>
|
||||
</article>
|
||||
<article class="report-card">
|
||||
<p class="eyebrow">Borrowing</p>
|
||||
<h2>Currently borrowed</h2>
|
||||
<p class="eyebrow">借阅</p>
|
||||
<h2>当前借出</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.borrowingSummary.activeLoans}" /></p>
|
||||
</article>
|
||||
<article class="report-card">
|
||||
<p class="eyebrow">Borrowing</p>
|
||||
<h2>Returned records</h2>
|
||||
<p class="eyebrow">借阅</p>
|
||||
<h2>已归还记录</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.borrowingSummary.returnedLoans}" /></p>
|
||||
</article>
|
||||
<article class="report-card report-card-alert">
|
||||
<p class="eyebrow">Borrowing</p>
|
||||
<h2>Overdue loans</h2>
|
||||
<p class="eyebrow">借阅</p>
|
||||
<h2>逾期借阅</h2>
|
||||
<p class="report-metric"><c:out value="${reportCenter.borrowingSummary.overdueLoans}" /></p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="overdue-report-title">
|
||||
<h2 id="overdue-report-title">Overdue list</h2>
|
||||
<h2 id="overdue-report-title">逾期列表</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty reportCenter.overdueRows}">
|
||||
<p class="empty-state">No active overdue borrowing records.</p>
|
||||
<p class="empty-state">当前没有逾期未还的借阅记录。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Reader</th>
|
||||
<th scope="col">Book</th>
|
||||
<th scope="col">Due date</th>
|
||||
<th scope="col">Overdue days</th>
|
||||
<th scope="col">读者</th>
|
||||
<th scope="col">图书</th>
|
||||
<th scope="col">应还日期</th>
|
||||
<th scope="col">逾期天数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -96,7 +96,7 @@
|
||||
<td><c:out value="${row.dueAtText}" /></td>
|
||||
<td>
|
||||
<span class="status-pill status-overdue">
|
||||
<c:out value="${row.overdueDays}" /> days
|
||||
<c:out value="${row.overdueDays}" /> 天
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -109,19 +109,19 @@
|
||||
</section>
|
||||
|
||||
<section class="table-panel" aria-labelledby="popular-report-title">
|
||||
<h2 id="popular-report-title">Popular borrowing ranking</h2>
|
||||
<h2 id="popular-report-title">热门借阅排行</h2>
|
||||
<c:choose>
|
||||
<c:when test="${empty reportCenter.popularBooks}">
|
||||
<p class="empty-state">No borrowing records are available for ranking yet.</p>
|
||||
<p class="empty-state">暂无可用于排行的借阅记录。</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Book</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Borrow records</th>
|
||||
<th scope="col">图书</th>
|
||||
<th scope="col">作者</th>
|
||||
<th scope="col">借阅次数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><c:out value="${areaName}" /> - MZH Library</title>
|
||||
<title><c:out value="${areaName}" /> - MZH 图书馆</title>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -17,67 +17,67 @@
|
||||
</p>
|
||||
<h1 id="area-title"><c:out value="${areaName}" /></h1>
|
||||
<p><c:out value="${areaSummary}" /></p>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/dashboard">Back to dashboard</a>
|
||||
<a class="button button-primary" href="${pageContext.request.contextPath}/dashboard">返回控制台</a>
|
||||
</section>
|
||||
|
||||
<section class="card-grid role-actions" aria-label="Workspace actions">
|
||||
<section class="card-grid role-actions" aria-label="工作区操作">
|
||||
<article class="workspace-card">
|
||||
<h2>Book Catalog</h2>
|
||||
<p>Search available collection records by title, author, category, or book identifier.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">Search catalog</a>
|
||||
<h2>馆藏检索</h2>
|
||||
<p>按书名、作者、分类或图书编号检索可用馆藏记录。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/catalog">检索馆藏</a>
|
||||
</article>
|
||||
|
||||
<c:if test="${sessionScope.userRole == 'administrator' or sessionScope.userRole == 'librarian'}">
|
||||
<c:if test="${sessionScope.userRole == 'administrator'}">
|
||||
<article class="workspace-card">
|
||||
<h2>User Management</h2>
|
||||
<p>Create, update, deactivate, and review login accounts.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">Manage users</a>
|
||||
<h2>用户管理</h2>
|
||||
<p>创建、更新、停用和查看登录账户。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/users">管理用户</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>System Logs</h2>
|
||||
<p>Review read-only audit entries for account and maintenance actions.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/system-logs">View logs</a>
|
||||
<h2>系统日志</h2>
|
||||
<p>查看账户与维护操作的只读审计记录。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/admin/system-logs">查看日志</a>
|
||||
</article>
|
||||
</c:if>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Book Management</h2>
|
||||
<p>Create, update, delete, and review inventory fields for book records.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">Manage books</a>
|
||||
<h2>图书管理</h2>
|
||||
<p>创建、更新、删除和查看图书记录的库存字段。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/books">管理图书</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Category Maintenance</h2>
|
||||
<p>Create, update, and retire catalog categories used by book records.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">Manage categories</a>
|
||||
<h2>分类维护</h2>
|
||||
<p>创建、更新和停用图书记录使用的馆藏分类。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/book-categories">管理分类</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Reader Management</h2>
|
||||
<p>Create, update, deactivate, and review eligibility fields for reader records.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">Manage readers</a>
|
||||
<h2>读者管理</h2>
|
||||
<p>创建、更新、停用和查看读者记录的资格字段。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/readers">管理读者</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Borrowing Management</h2>
|
||||
<p>Create loans, process returns, renew records, and review overdue items.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">Manage borrowing</a>
|
||||
<h2>借阅管理</h2>
|
||||
<p>创建借阅、处理归还、续借记录并查看逾期项目。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/borrowing">管理借阅</a>
|
||||
</article>
|
||||
|
||||
<article class="workspace-card">
|
||||
<h2>Report Center</h2>
|
||||
<p>Review inventory summaries, borrowing health, overdue lists, and popular books.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reports">View reports</a>
|
||||
<h2>报表中心</h2>
|
||||
<p>查看库存摘要、借阅状况、逾期列表和热门图书。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reports">查看报表</a>
|
||||
</article>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${sessionScope.userRole == 'reader'}">
|
||||
<article class="workspace-card">
|
||||
<h2>My Loan History</h2>
|
||||
<p>Review active loans, returned records, renewal counts, and overdue status.</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reader/loans">View history</a>
|
||||
<h2>我的借阅历史</h2>
|
||||
<p>查看在借记录、已还记录、续借次数和逾期状态。</p>
|
||||
<a class="button button-secondary" href="${pageContext.request.contextPath}/reader/loans">查看历史</a>
|
||||
</article>
|
||||
</c:if>
|
||||
</section>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
|
||||
<display-name>MZH Library Management</display-name>
|
||||
<display-name>MZH 图书馆管理系统</display-name>
|
||||
|
||||
<filter>
|
||||
<filter-name>CharacterEncodingFilter</filter-name>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="960" viewBox="0 0 1440 960" role="img" aria-label="Library shelves">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="960" viewBox="0 0 1440 960" role="img" aria-label="图书馆书架">
|
||||
<rect width="1440" height="960" fill="#e8edf1"/>
|
||||
<rect x="0" y="705" width="1440" height="255" fill="#d4ddd8"/>
|
||||
<g opacity="0.92">
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user