This commit is contained in:
y-kumaki
2026-09-18 15:17:50 +09:00
15 changed files with 2419 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class ApprovalReceive {
@GetMapping("/approvalReceive")
public String approvalReceive() {
return "approvalReceive";
}
}

View File

@@ -0,0 +1,23 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.SessionAttributes;
@Controller
@SessionAttributes("bookApprovalForm") //セッションに保存
public class BookApprovalController {
@GetMapping("/bookApproval")
public String bookApproval() {
return "bookApproval";
}
@PostMapping("/bookApprovalConfirm")
public String bookApprovalConfirm() {
return "bookApprovalConfirm";
}
}

View File

@@ -1,14 +1,15 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@Controller
public class BookController {
@GetMapping("/book")
@PostMapping("/book")
public String book() {
return "book";
}
}

View File

@@ -0,0 +1,14 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class BookInsertConfirmController {
@GetMapping("/bookInsertConfirm")
public String bookInsertConfirm() {
return "bookInsertConfirm";
}
}

View File

@@ -0,0 +1,13 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class BookInsertController {
@GetMapping("bookInsert")
public String bookInsert() {
return "bookInsert";
}
}

View File

@@ -0,0 +1,13 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class LendListController {
@GetMapping("/lendList")
public String lendList() {
return "lendList";
}
}

View File

@@ -0,0 +1,24 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@Controller
public class LoginController {
@GetMapping("/login")
public String showLogin() {
return "login";
}
@PostMapping("/doLogin")
public String doLogin() {
return "redirect:/topmenu";
}
@GetMapping("/topmenu")
public String showTopMenu() {
return "topmenu";
}
}

View File

@@ -1,10 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>寄贈申請 受信BOX</title>
<meta charset="UTF-8">
<title>寄贈申請 受信BOX</title>
</head>
<body>
<h1>寄贈申請 受信BOX</h1>
<!-- action先要修正 -->
<form action="/approvalReceive" method="GET">
<input type="submit" value="承認" class="btn">
</form>
<!-- action先要修正 -->
<form action="/approvalReceive" method="GET">
<input type="submit" value="却下" class="btn">
</form>
<!-- 新規登録画面へ遷移 -->
<form action="/bookInsert" method="GET">
<input type="submit" value="登録" class="btn">
</form>
<!-- action先要修正 -->
<form action="/approvalReceive" method="GET">
<input type="submit" value="戻る" class="btn">
</form>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,856 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>寄贈申請内容確認</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Yu Gothic", "Meiryo", sans-serif;
}
body {
background: #f5f7fa;
color: #333;
}
/* =========================
ヘッダー
========================= */
.header {
height: 60px;
background: #fff;
border-bottom: 1px solid #e5e7eb;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
}
.logo {
font-size: 20px;
font-weight: bold;
color: #1b3768;
}
.header-right {
display: flex;
align-items: center;
gap: 16px;
}
.notification {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
font-size: 18px;
cursor: pointer;
border-radius: 4px;
transition: background-color 0.2s;
}
.notification:hover {
background: #f0f4fa;
}
.notification-badge {
position: absolute;
top: 3px;
right: 3px;
width: 7px;
height: 7px;
background: #dc2626;
border-radius: 50%;
border: 1px solid #fff;
}
.account {
padding: 8px 10px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s, color 0.2s;
}
.account:hover {
background: #f0f4fa;
color: #1659d4;
}
.logout-btn {
padding: 8px 15px;
background: #fff;
border: 1px solid #d1d5db;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s,
border-color 0.2s,
color 0.2s;
}
.logout-btn:hover {
background: #f0f4fa;
border-color: #1659d4;
color: #1659d4;
}
/* =========================
レイアウト
========================= */
.wrapper {
display: flex;
min-height: calc(100vh - 60px);
}
/* =========================
サイドメニュー
========================= */
.sidebar {
width: 220px;
background: #002b66;
color: #fff;
}
.sidebar-title {
padding: 18px;
font-size: 13px;
border-bottom: 1px solid rgba(255,255,255,.1);
}
.menu {
list-style: none;
}
.menu li {
padding: 16px 20px;
cursor: pointer;
transition: background-color 0.2s;
}
.menu li:hover {
background: #0d477f;
}
.menu li.active {
background: #1158d8;
border-radius: 4px;
margin: 8px;
}
/* =========================
メイン
========================= */
.main {
flex: 1;
padding: 24px;
}
.breadcrumb {
font-size: 12px;
color: #64748b;
margin-bottom: 15px;
}
.page-title {
font-size: 38px;
color: #173a70;
margin-bottom: 10px;
}
.description {
font-size: 14px;
margin-bottom: 4px;
}
.required-note {
color: #d9534f;
font-size: 12px;
margin-bottom: 18px;
}
/* =========================
カード
========================= */
.card {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 4px;
}
.card-body {
padding: 25px;
}
.section-title {
font-weight: bold;
margin-bottom: 15px;
color: #1f3a64;
}
/* =========================
フォーム
========================= */
.form-grid {
display: flex;
flex-direction: column;
gap: 18px;
}
.form-group {
display: flex;
align-items: flex-start;
}
.form-group label {
width: 140px;
flex-shrink: 0;
font-size: 13px;
font-weight: bold;
padding-top: 10px;
}
.input-area {
flex: 1;
max-width: 700px;
}
.required {
color: #d9534f;
font-size: 11px;
}
.optional {
color: #555;
font-size: 11px;
}
input[type="text"],
input[type="date"],
select,
textarea {
width: 100%;
border: 1px solid #d6dbe3;
border-radius: 4px;
padding: 10px;
font-size: 13px;
background: #fff;
}
input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
outline: none;
border-color: #1659d4;
box-shadow: 0 0 0 2px rgba(22, 89, 212, 0.1);
}
input[readonly] {
background: #f3f4f6;
}
textarea {
resize: none;
height: 90px;
}
.help {
font-size: 11px;
color: #6b7280;
margin-top: 4px;
}
.counter {
text-align: right;
font-size: 11px;
color: #888;
margin-top: 3px;
}
/* =========================
必須・任意項目の区切り
========================= */
.optional-section {
margin-top: 25px;
padding-top: 22px;
border-top: 1px solid #e5e7eb;
}
.optional-section-title {
font-weight: bold;
color: #1f3a64;
margin-bottom: 15px;
}
/* =========================
ボタン
========================= */
.button-area {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.btn {
min-width: 120px;
padding: 10px 20px;
border-radius: 4px;
border: 1px solid #d1d5db;
background: #fff;
cursor: pointer;
font-weight: bold;
transition: background-color 0.2s,
border-color 0.2s,
color 0.2s;
}
.btn:hover {
background: #f0f4fa;
border-color: #1659d4;
color: #1659d4;
}
.btn-primary {
background: #1158d8;
border: none;
color: #fff;
}
.btn-primary:hover {
background: #0d47b5;
color: #fff;
}
.right-btns {
display: flex;
gap: 12px;
}
/* =========================
フッター
========================= */
.footer {
text-align: center;
margin-top: 25px;
font-size: 12px;
color: #666;
}
/* =========================
レスポンシブ
========================= */
@media (max-width: 700px) {
.header {
padding: 0 12px;
}
.logo {
font-size: 16px;
}
.account {
display: none;
}
.sidebar {
width: 180px;
}
.main {
padding: 18px;
}
.page-title {
font-size: 30px;
}
.form-group {
flex-direction: column;
}
.form-group label {
width: 100%;
padding-top: 0;
margin-bottom: 6px;
}
.input-area {
width: 100%;
max-width: none;
}
.button-area {
flex-direction: column;
gap: 12px;
align-items: stretch;
}
.right-btns {
justify-content: flex-end;
}
}
@media (max-width: 480px) {
.sidebar {
display: none;
}
.main {
padding: 15px;
}
.page-title {
font-size: 25px;
}
.card-body {
padding: 18px;
}
.right-btns {
flex-direction: column;
}
.btn {
width: 100%;
}
}
</style>
</head>
<body>
<header class="header">
<div class="logo">
📖 ShareBooks
</div>
<div class="header-right">
<!-- サインイン中アカウント -->
<span class="account">
山田 太郎 さん(一般ユーザ)
</span>
<!-- ログアウト -->
<button type="button" class="logout-btn">
ログアウト
</button>
</div>
</header>
<div class="wrapper">
<!-- =========================
サイドメニュー
========================= -->
<aside class="sidebar">
<div class="sidebar-title">
一般メニュー
</div>
<ul class="menu">
<li>
🏠 トップメニュー
</li>
<li class="active">
新規図書申請
</li>
</ul>
</aside>
<!-- =========================
メイン
========================= -->
<main class="main">
<div class="breadcrumb">
トップメニュー > 新規図書申請>申請内容確認
</div>
<h1 class="page-title">
寄贈申請内容確認
</h1>
<div class="description">
入力した内容に間違いがないかご確認ください。よろしければ「申請する」ボタンを押してください。
</div>
<div class="required-note">
(※)は必須項目です。
</div>
<form action="BookDonationConfirmServlet" method="post">
<div class="card">
<div class="card-body">
<!-- =========================
申請者情報
========================= -->
<div class="section-title">
申請者情報(ログイン中のアカウント情報)
</div>
<div class="form-grid">
<div class="form-group">
<label>
社員ID
</label>
<div class="input-area">
<input
type="text"
value="123456"
readonly>
</div>
</div>
<div class="form-group">
<label>
部署
</label>
<div class="input-area">
<input
type="text"
value="システム開発部"
readonly>
</div>
</div>
<div class="form-group">
<label>
氏名
</label>
<div class="input-area">
<input
type="text"
value="山田 太郎"
readonly>
</div>
</div>
</div>
<br>
<hr style="border:1px solid #edf0f2;">
<br>
<!-- =========================
必須項目
========================= -->
<div class="section-title">
本の情報(必須項目)
</div>
<div class="form-grid">
<!-- タイトル -->
<div class="form-group">
<label>
<span class="required">(※)</span>
タイトル
</label>
<div class="input-area">
<input
type="text"
name="title"
placeholder="タイトルを入力してください">
</div>
</div>
<!-- 著者名 -->
<div class="form-group">
<label>
<span class="required">(※)</span>
著者名
</label>
<div class="input-area">
<input
type="text"
name="author"
placeholder="著者名を入力してください">
</div>
</div>
<!-- 本の状態 -->
<div class="form-group">
<label>
<span class="required">(※)</span>
本の状態
</label>
<div class="input-area">
<select name="bookCondition">
<option value="">
選択してください
</option>
<option value="0">
0:不明
</option>
<option value="1">
1:新品同様・ほぼ未使用
</option>
<option value="2">
2:良好・目立つ傷や汚れ無し
</option>
<option value="3">
3:使用感あり・多少の折れ、擦れあり
</option>
<option value="4">
4:傷みあり・目立つ傷、汚れ、書き込みあり
</option>
</select>
</div>
</div>
</div>
<!-- =========================
任意項目
========================= -->
<div class="optional-section">
<div class="optional-section-title">
本の情報(任意項目)
</div>
<div class="form-grid">
<!-- 出版社 -->
<div class="form-group">
<label>
出版社
<span class="optional">(任意)</span>
</label>
<div class="input-area">
<input
type="text"
name="publisher"
placeholder="出版社を入力してください">
</div>
</div>
<!-- ISBN -->
<div class="form-group">
<label>
ISBN
<span class="optional">(任意)</span>
</label>
<div class="input-area">
<input
type="text"
name="isbn"
placeholder="ISBNがある場合は入力してください">
</div>
<div class="help">
</div>
</div>
<!-- 出版日 -->
<div class="form-group">
<label>
出版日
<span class="optional">(任意)</span>
</label>
<div class="input-area">
<input
type="date"
name="publishDate">
<div class="help">
※出版日が分かる場合に入力してください。
</div>
</div>
</div>
<!-- 備考 -->
<div class="form-group">
<label>
備考
<span class="optional">(任意)</span>
</label>
<div class="input-area">
<textarea
name="remarks"
placeholder="付属品の有無(CD/DVD等)や、本の概要が分かるAmazon等のURLなどをご記入ください"></textarea>
<div class="counter">
0 / 300
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- =========================
ボタン
========================= -->
<div class="button-area">
<button
type="button"
class="btn">
トップメニューへ戻る
</button>
<div class="right-btns">
<button
type="reset"
class="btn">
修正
</button>
<button
type="submit"
class="btn btn-primary">
確定
</button>
</div>
</div>
</form>
<div class="footer">
© 2026 社内備品・図書管理システム
</div>
</main>
</div>
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>新規図書登録</title>
</head>
<body>
<h1>新規図書登録入力</h1>
<form action="/bookInsertConfirm" method="GET">
<input type="submit" value="確認画面へ" class="btn">
</body>
</html>

View File

@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登録内容確認</title>
</head>
<body>
<h1>登録内容確認</h1>
<!-- 戻る -->
<form action="/bookInsert" method="GET">
<input type="submit" value="戻る" class="btn">
</form>
<!-- 完了 -->
<form action="/book" method="GET">
<input type="submit" value="完了" class="btn">
</form>
<div id="registerModal" class="modal-overlay">
<div class="modal">
<div class="modal-message">
新規図書の登録が完了しました!
</div>
<div class="modal-buttons">
<!-- 続けて追加 -->
<form method="get" action="/bookInsert">
<button type="submit" class="modal-btn">
続けて追加
</button>
</form>
<!-- 図書一覧へ戻る -->
<form method="get" action="/book">
<button type="submit" class="modal-btn modal-btn-primary">
図書一覧へ戻る
</button>
</form>
<!-- トップメニューへ戻る -->
<form method="get" action="/topmenu">
<button type="submit" class="modal-btn modal-btn-primary">
トップメニューへ戻る
</button>
</form>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>貸出中図書一覧</title>
</head>
<body>
<h1>貸出中図書一覧</h1>
<!-- action先要修正 -->
<form action="/lendList" method="GET">
<input type="submit" value="返却" class="btn">
</form>
<!-- 以下ポップアップ -->
<div id="registerModal" class="modal-overlay">
<div class="modal">
<div class="modal-message">
返却処理が完了しました!
</div>
<div class="modal-buttons">
<!-- OK -->
<form method="get" action="/lendList">
<button type="submit" class="modal-btn">
OK
</button>
</form>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ログイン</title>
</head>
<body>
<h1>ログイン</h1>
<form action="doLogin"
method="post"
th:object="${loginInfoForm}">
<div class="msgBox error" th:if="${messageError} != null">
<span class="error" th:text="${messageError.message}"></span>
</div>
<table>
<tr>
<td class="btnArea" colspan="2">
<input type="submit" value="ログイン"/>
<button onclick="clearInput()">リセット</button>
</td>
</tr>
</table>
</form>
</body>
</html>

View File

@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>トップメニュー</title>
</head>
<body>
<h1>
メインメニュー
</h1>
<!-- ===== 共通:社内図書一覧 ===== -->
<form method="post" name="社内図書一覧" action="book">
<a href="javascript:form1.submit()">リンク名</a>
<button type="submit" class="btn-book">
<h3>社内図書一覧</h3>
<p>
登録されている図書の<br> 一覧を表示します。
</p>
</button>
</form>
<hr> <!--区切り線-->
<!-- ===== 共通:寄贈申請 ===== -->
<a class="card" href="/bookApproval">
<h3>寄贈申請</h3>
<p>
寄贈申請フォームの<br> 入力を行います。
</p>
</a>
<hr>
<!-- ===== 管理者のみ ===== -->
<a class="card" href="/bookInsert">
<h3>新規図書登録</h3>
<p>
図書の登録申請を<br> 行います。
</p>
</a>
<hr>
<a class="card" href="/lendList">
<h3>貸出中図書一覧</h3>
<p>
貸出中図書の<br> 一覧を表示します。
</p>
</a>
<hr>
<a class="card" href="/approvalReceive">
<h3>寄贈申請受信BOX</h3>
<p>
寄贈申請の<br> 受信一覧を確認します。
</p>
</a>
</body>
</html>