This commit is contained in:
m-shimizu
2026-10-20 16:08:03 +09:00
parent 9bba174df3
commit 136b18bfc7
2 changed files with 5 additions and 54 deletions

View File

@@ -6,41 +6,8 @@ import org.springframework.web.bind.annotation.GetMapping;
/** メニュー画面(menu.html)。表示内容は管理者フラグで切り替える。 */ /** メニュー画面(menu.html)。表示内容は管理者フラグで切り替える。 */
@Controller @Controller
public class MenuController { public class MenuController {
<<<<<<< HEAD
@GetMapping("/menu")
public String showMenu(Model model) {
// 仮のログインユーザー名
model.addAttribute("loginUserName", "テストユーザー");
// menu.htmlを表示
=======
@GetMapping("/menu") @GetMapping("/menu")
public String menu() { public String menu() {
>>>>>>> a2a406dd8b1fc59df6056bcb128d62be9c6e1176
return "menu"; return "menu";
} }
} }
//@Controller
//public class MenuController {
//
// // メニュー画面表示
// @GetMapping("/menu")
// public String showMenu() {
// return "menu";
// }
//
// // ログアウト処理
// @PostMapping("/logout")
// public String logout(HttpServletRequest request) {
//
// HttpSession session = request.getSession(false);
//
// if (session != null) {
// session.invalidate();
// }
//
// return "redirect:/login";
// }
//}

View File

@@ -6,24 +6,6 @@
<link rel="stylesheet" th:href="@{/css/style.css}"> <link rel="stylesheet" th:href="@{/css/style.css}">
</head> </head>
<body> <body>
<<<<<<< HEAD
<!-- <div th:replace="~{fragments/header :: header}"></div>-->
<main>
<h1>書籍管理システム</h1>
<h2>メニュー</h2>
<div class="error" th:if="${errorMessage}" th:text="${errorMessage}"></div>
<div class="card menu">
<a class="btn" th:href="@{/books}">書籍一覧</a>
<!-- 管理者のみ(サーバー側でも /admin/** は管理者以外を拒否している) -->
<th:block th:if="${session.loginUser.admin}">
<a class="btn" th:href="@{/admin/applications}">書籍貸出申請一覧</a>
<a class="btn" th:href="@{/admin/lendings}">貸出中書籍一覧</a>
<a class="btn" th:href="@{/admin/employees/new}">社員登録</a>
</th:block>
<a class="btn" th:href="@{/employees/search}">社員編集</a>
</div>
</main>
=======
<div th:replace="~{fragments/header :: header}"></div> <div th:replace="~{fragments/header :: header}"></div>
<main> <main>
<h1>メニュー</h1> <h1>メニュー</h1>
@@ -39,6 +21,8 @@
<a class="btn" th:href="@{/employees/search}">社員編集</a> <a class="btn" th:href="@{/employees/search}">社員編集</a>
</div> </div>
</main> </main>
>>>>>>> a2a406dd8b1fc59df6056bcb128d62be9c6e1176
</body> </body>
</html> </html>