@@ -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)));
|
||||
|
||||
@@ -22,27 +22,50 @@
|
||||
<div class="admin_content_wrap">
|
||||
<div class="admin_content_subject"><span>작가 관리</span></div>
|
||||
<div class="author_table_wrap">
|
||||
<table class="author_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="th_column_1">작가 번호</td>
|
||||
<td class="th_column_2">작가 이름</td>
|
||||
<td class="th_column_3">작가 국가</td>
|
||||
<td class="th_column_4">등록 날짜</td>
|
||||
<td class="th_column_5">수정 날짜</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:forEach items="${list}" var="list">
|
||||
<tr>
|
||||
<td><c:out value="${list.authorId}"></c:out> </td>
|
||||
<td><c:out value="${list.authorName}"></c:out></td>
|
||||
<td><c:out value="${list.nationName}"></c:out> </td>
|
||||
<td><fmt:formatDate value="${list.regDate}" pattern="yyyy-MM-dd"/></td>
|
||||
<td><fmt:formatDate value="${list.updateDate}" pattern="yyyy-MM-dd"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
<!-- 게시물 O -->
|
||||
<c:if test="${listCheck != 'empty' }">
|
||||
<table class="author_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="th_column_1">작가 번호</td>
|
||||
<td class="th_column_2">작가 이름</td>
|
||||
<td class="th_column_3">작가 국가</td>
|
||||
<td class="th_column_4">등록 날짜</td>
|
||||
<td class="th_column_5">수정 날짜</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:forEach items="${list}" var="list">
|
||||
<tr>
|
||||
<td><c:out value="${list.authorId}"></c:out> </td>
|
||||
<td><c:out value="${list.authorName}"></c:out></td>
|
||||
<td><c:out value="${list.nationName}"></c:out> </td>
|
||||
<td><fmt:formatDate value="${list.regDate}" pattern="yyyy-MM-dd"/></td>
|
||||
<td><fmt:formatDate value="${list.updateDate}" pattern="yyyy-MM-dd"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</c:if>
|
||||
|
||||
<!-- 게시물 x -->
|
||||
<c:if test="${listCheck == 'empty'}">
|
||||
<div class="table_empty">
|
||||
등록된 작가가 없습니다.
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 검색 영역 -->
|
||||
<div class="search_wrap">
|
||||
<form id="searchForm" action="/admin/authorManage" method="get">
|
||||
<div class="search_input">
|
||||
<input type="text" name="keyword" value='<c:out value="${pageMaker.cri.keyword}"></c:out>'>
|
||||
<input type="hidden" name="pageNum" value='<c:out value="${pageMaker.cri.pageNum }"></c:out>'>
|
||||
<input type="hidden" name="amount" value='${pageMaker.cri.amount}'>
|
||||
<button class='btn search_btn'>검 색</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 이동 인터페이스 영역 -->
|
||||
<div class="pageMaker_wrap" >
|
||||
@@ -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();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -22,27 +22,50 @@
|
||||
<div class="admin_content_wrap">
|
||||
<div class="admin_content_subject"><span>작가 관리</span></div>
|
||||
<div class="author_table_wrap">
|
||||
<table class="author_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="th_column_1">작가 번호</td>
|
||||
<td class="th_column_2">작가 이름</td>
|
||||
<td class="th_column_3">작가 국가</td>
|
||||
<td class="th_column_4">등록 날짜</td>
|
||||
<td class="th_column_5">수정 날짜</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:forEach items="${list}" var="list">
|
||||
<tr>
|
||||
<td><c:out value="${list.authorId}"></c:out> </td>
|
||||
<td><c:out value="${list.authorName}"></c:out></td>
|
||||
<td><c:out value="${list.nationName}"></c:out> </td>
|
||||
<td><fmt:formatDate value="${list.regDate}" pattern="yyyy-MM-dd"/></td>
|
||||
<td><fmt:formatDate value="${list.updateDate}" pattern="yyyy-MM-dd"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
<!-- 게시물 O -->
|
||||
<c:if test="${listCheck != 'empty' }">
|
||||
<table class="author_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="th_column_1">작가 번호</td>
|
||||
<td class="th_column_2">작가 이름</td>
|
||||
<td class="th_column_3">작가 국가</td>
|
||||
<td class="th_column_4">등록 날짜</td>
|
||||
<td class="th_column_5">수정 날짜</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:forEach items="${list}" var="list">
|
||||
<tr>
|
||||
<td><c:out value="${list.authorId}"></c:out> </td>
|
||||
<td><c:out value="${list.authorName}"></c:out></td>
|
||||
<td><c:out value="${list.nationName}"></c:out> </td>
|
||||
<td><fmt:formatDate value="${list.regDate}" pattern="yyyy-MM-dd"/></td>
|
||||
<td><fmt:formatDate value="${list.updateDate}" pattern="yyyy-MM-dd"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</c:if>
|
||||
|
||||
<!-- 게시물 x -->
|
||||
<c:if test="${listCheck == 'empty'}">
|
||||
<div class="table_empty">
|
||||
등록된 작가가 없습니다.
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 검색 영역 -->
|
||||
<div class="search_wrap">
|
||||
<form id="searchForm" action="/admin/authorManage" method="get">
|
||||
<div class="search_input">
|
||||
<input type="text" name="keyword" value='<c:out value="${pageMaker.cri.keyword}"></c:out>'>
|
||||
<input type="hidden" name="pageNum" value='<c:out value="${pageMaker.cri.pageNum }"></c:out>'>
|
||||
<input type="hidden" name="amount" value='${pageMaker.cri.amount}'>
|
||||
<button class='btn search_btn'>검 색</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 이동 인터페이스 영역 -->
|
||||
<div class="pageMaker_wrap" >
|
||||
@@ -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();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user