diff --git a/VamPa/src/main/java/com/vam/controller/AdminController.java b/VamPa/src/main/java/com/vam/controller/AdminController.java index 3eb5a81..0d5a665 100644 --- a/VamPa/src/main/java/com/vam/controller/AdminController.java +++ b/VamPa/src/main/java/com/vam/controller/AdminController.java @@ -60,7 +60,11 @@ public class AdminController { /* 작가 목록 출력 데이터 */ List list = authorService.authorGetList(cri); - model.addAttribute("list", list); + if(!list.isEmpty()) { + model.addAttribute("list",list); // 작가 존재 경우 + } else { + model.addAttribute("listCheck", "empty"); // 작가 존재하지 않을 경우 + } /* 페이지 이동 인터페이스 데이터 */ model.addAttribute("pageMaker", new PageDTO(cri, authorService.authorGetTotal(cri))); diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp index 4f8982a..0993abb 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp @@ -22,27 +22,50 @@
작가 관리
- - - - - - - - - - - - - - - - - - - -
작가 번호작가 이름작가 국가등록 날짜수정 날짜
+ + + + + + + + + + + + + + + + + + + + + +
작가 번호작가 이름작가 국가등록 날짜수정 날짜
+
+ + + +
+ 등록된 작가가 없습니다. +
+
+
+ + +
+
+
+ + + + +
+
+
@@ -104,6 +127,7 @@ $(document).ready(function(){ }); let moveForm = $('#moveForm'); +let searchForm = $('#searchForm'); /* 페이지 이동 버튼 */ $(".pageMaker_btn a").on("click", function(e){ @@ -116,6 +140,23 @@ $(".pageMaker_btn a").on("click", function(e){ }); +/* 작거 검색 버튼 동작 */ +$("#searchForm button").on("click", function(e){ + + e.preventDefault(); + + /* 검색 키워드 유효성 검사 */ + if(!searchForm.find("input[name='keyword']").val()){ + alert("키워드를 입력하십시오"); + return false; + } + + searchForm.find("input[name='pageNum']").val("1"); + + searchForm.submit(); + +}); + diff --git a/VamPa/src/main/webapp/resources/css/admin/authorManage.css b/VamPa/src/main/webapp/resources/css/admin/authorManage.css index 920f021..bcfb2fa 100644 --- a/VamPa/src/main/webapp/resources/css/admin/authorManage.css +++ b/VamPa/src/main/webapp/resources/css/admin/authorManage.css @@ -140,6 +140,39 @@ ul{ + + /* 검색 영역 */ +.search_wrap{ + margin-top:15px; +} +.search_input{ + position: relative; + text-align:center; +} +.search_input input[name='keyword']{ + padding: 4px 10px; + font-size: 15px; + height: 20px; + line-height: 20px; +} +.search_btn{ + height: 32px; + width: 80px; + font-weight: 600; + font-size: 18px; + line-height: 20px; + position: absolute; + margin-left: 15px; + background-color: #c3daf7; +} + +.table_empty{ + height: 50px; + text-align: center; + margin: 200px 0 215px 0px; + font-size: 25px; +} + /* 페이지 버튼 인터페이스 */ .pageMaker_wrap{ text-align: center; diff --git a/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java b/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java index f77ee63..2f0d6ad 100644 --- a/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java +++ b/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java @@ -60,7 +60,11 @@ public class AdminController { /* 작가 목록 출력 데이터 */ List list = authorService.authorGetList(cri); - model.addAttribute("list", list); + if(!list.isEmpty()) { + model.addAttribute("list",list); // 작가 존재 경우 + } else { + model.addAttribute("listCheck", "empty"); // 작가 존재하지 않을 경우 + } /* 페이지 이동 인터페이스 데이터 */ model.addAttribute("pageMaker", new PageDTO(cri, authorService.authorGetTotal(cri))); diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp index 4f8982a..0993abb 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp @@ -22,27 +22,50 @@
작가 관리
- - - - - - - - - - - - - - - - - - - -
작가 번호작가 이름작가 국가등록 날짜수정 날짜
+ + + + + + + + + + + + + + + + + + + + + +
작가 번호작가 이름작가 국가등록 날짜수정 날짜
+
+ + + +
+ 등록된 작가가 없습니다. +
+
+
+ + +
+
+
+ + + + +
+
+
@@ -104,6 +127,7 @@ $(document).ready(function(){ }); let moveForm = $('#moveForm'); +let searchForm = $('#searchForm'); /* 페이지 이동 버튼 */ $(".pageMaker_btn a").on("click", function(e){ @@ -116,6 +140,23 @@ $(".pageMaker_btn a").on("click", function(e){ }); +/* 작거 검색 버튼 동작 */ +$("#searchForm button").on("click", function(e){ + + e.preventDefault(); + + /* 검색 키워드 유효성 검사 */ + if(!searchForm.find("input[name='keyword']").val()){ + alert("키워드를 입력하십시오"); + return false; + } + + searchForm.find("input[name='pageNum']").val("1"); + + searchForm.submit(); + +}); + diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css index 920f021..bcfb2fa 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css @@ -140,6 +140,39 @@ ul{ + + /* 검색 영역 */ +.search_wrap{ + margin-top:15px; +} +.search_input{ + position: relative; + text-align:center; +} +.search_input input[name='keyword']{ + padding: 4px 10px; + font-size: 15px; + height: 20px; + line-height: 20px; +} +.search_btn{ + height: 32px; + width: 80px; + font-weight: 600; + font-size: 18px; + line-height: 20px; + position: absolute; + margin-left: 15px; + background-color: #c3daf7; +} + +.table_empty{ + height: 50px; + text-align: center; + margin: 200px 0 215px 0px; + font-size: 25px; +} + /* 페이지 버튼 인터페이스 */ .pageMaker_wrap{ text-align: center;