@@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
@@ -84,6 +85,20 @@ public class AdminController {
|
||||
return "redirect:/admin/authorManage";
|
||||
|
||||
}
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
@GetMapping("/authorDetail")
|
||||
public void authorGetInfoGET(int authorId, Criteria cri, Model model) throws Exception {
|
||||
|
||||
logger.info("authorDetail......." + authorId);
|
||||
|
||||
/* 작가 관리 페이지 정보 */
|
||||
model.addAttribute("cri", cri);
|
||||
|
||||
/* 선택 작가 정보 */
|
||||
model.addAttribute("authorInfo", authorService.authorGetDetail(authorId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,7 @@ public interface AuthorMapper {
|
||||
/* 작가 총 수 */
|
||||
public int authorGetTotal(Criteria cri);
|
||||
|
||||
/* 작가 상세 */
|
||||
public AuthorVO authorGetDetail(int authorId);
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,7 @@ public interface AuthorService {
|
||||
/* 작가 총 수 */
|
||||
public int authorGetTotal(Criteria cri) throws Exception;
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
public AuthorVO authorGetDetail(int authorId) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,4 +43,11 @@ public class AuthorServiceImpl implements AuthorService {
|
||||
return authorMapper.authorGetTotal(cri);
|
||||
}
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
@Override
|
||||
public AuthorVO authorGetDetail(int authorId) throws Exception {
|
||||
log.info("authorGetDetail........" + authorId);
|
||||
return authorMapper.authorGetDetail(authorId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<![CDATA[
|
||||
select * from (
|
||||
select /*+INDEX_DESC(vam_author SYS_C007515) */
|
||||
select /*+INDEX_DESC(vam_author SYS_C007451) */
|
||||
rownum as rn, authorid, authorname, nationid, regdate, updatedate
|
||||
from vam_author
|
||||
where
|
||||
@@ -46,6 +46,13 @@
|
||||
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</select>
|
||||
|
||||
<!-- 작가 디테일 페이지 -->
|
||||
<select id="authorGetDetail" resultType="com.vam.model.AuthorVO">
|
||||
|
||||
select * from vam_author where authorid = #{authorId}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
118
VamPa/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp
Normal file
118
VamPa/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp
Normal file
@@ -0,0 +1,118 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../resources/css/admin/authorDetail.css">
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.js"
|
||||
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
||||
crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<%@include file="../includes/admin/header.jsp" %>
|
||||
<div class="admin_content_wrap">
|
||||
<div class="admin_content_subject"><span>작가 상세</span></div>
|
||||
<div class="admin_content_main">
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>작가 번호</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" name="authorId" readonly="readonly" value="<c:out value='${authorInfo.authorId }'></c:out>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>작가 이름</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" name="authorName" readonly="readonly" value="<c:out value='${authorInfo.authorName }'></c:out>" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>소속 국가</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<select class="input_block" name="nationId" >
|
||||
<option value="none" selected disabled="disabled">=== 선택 ===</option>
|
||||
<option value="01" disabled="disabled" <c:out value=" ${authorInfo.nationId eq '01' ?'selected':''}"/>>국내</option>
|
||||
<option value="02" disabled="disabled" <c:out value=" ${authorInfo.nationId eq '02' ?'selected':''}"/>>국외</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>작가소개</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<textarea class="input_block" name="authorIntro" readonly="readonly"><c:out value='${authorInfo.authorIntro }'/></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>등록 날짜</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" type="text" readonly="readonly" value="<fmt:formatDate value="${authorInfo.regDate}" pattern="yyyy-MM-dd"/>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>수정 날짜</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" type="text" readonly="readonly" value="<fmt:formatDate value="${authorInfo.updateDate}" pattern="yyyy-MM-dd"/>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn_section">
|
||||
<button id="cancelBtn" class="btn">작가 목록</button>
|
||||
<button id="modifyBtn" class="btn modify_btn">수 정</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="moveForm" method="get">
|
||||
<input type="hidden" name="authorId" value='<c:out value="${authorInfo.authorId }"/>'>
|
||||
<input type="hidden" name="pageNum" value='<c:out value="${cri.pageNum }"/>'>
|
||||
<input type="hidden" name="amount" value='<c:out value="${cri.amount }"/>' >
|
||||
<input type="hidden" name="keyword" value='<c:out value="${cri.keyword }"/>'>
|
||||
</form>
|
||||
<%@include file="../includes/admin/footer.jsp" %>
|
||||
|
||||
<script>
|
||||
|
||||
let moveForm = $("#moveForm");
|
||||
|
||||
/* 작가 관리 페이지 이동 버튼 */
|
||||
$("#cancelBtn").on("click", function(e){
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$("input[name=authorId]").remove();
|
||||
moveForm.attr("action", "/admin/authorManage")
|
||||
moveForm.submit();
|
||||
|
||||
});
|
||||
|
||||
/* 작가 수정 페이지 이동 버튼 */
|
||||
$("#modifyBtn").on("click", function(e){
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
moveForm.attr("action", "/admin/authorModify");
|
||||
moveForm.submit();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -37,7 +37,11 @@
|
||||
<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>
|
||||
<a class="move" href='<c:out value="${list.authorId}"/>'>
|
||||
<c:out value="${list.authorName}"></c:out>
|
||||
</a>
|
||||
</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>
|
||||
@@ -157,6 +161,17 @@ $("#searchForm button").on("click", function(e){
|
||||
|
||||
});
|
||||
|
||||
/* 작가 상세 페이지 이동 */
|
||||
$(".move").on("click", function(e){
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
moveForm.append("<input type='hidden' name='authorId' value='"+ $(this).attr("href") + "'>");
|
||||
moveForm.attr("action", "/admin/authorDetail");
|
||||
moveForm.submit();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
239
VamPa/src/main/webapp/resources/css/admin/authorDetail.css
Normal file
239
VamPa/src/main/webapp/resources/css/admin/authorDetail.css
Normal file
@@ -0,0 +1,239 @@
|
||||
@charset "UTF-8";
|
||||
*{
|
||||
margin: 0;
|
||||
padding:0;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
ul{
|
||||
list-style: none;
|
||||
}
|
||||
/* 화면 전체 렙 */
|
||||
.wrapper{
|
||||
width: 100%;
|
||||
}
|
||||
/* content 랩 */
|
||||
.wrap{
|
||||
width : 1080px;
|
||||
margin: auto;
|
||||
}
|
||||
/* 홈페이지 기능 네비 */
|
||||
.top_gnb_area{
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background-color: #f0f0f1;
|
||||
position:relative;
|
||||
}
|
||||
.top_gnb_area .list{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0;
|
||||
|
||||
}
|
||||
.top_gnb_area .list li{
|
||||
list-style: none;
|
||||
float : left;
|
||||
padding: 13px 15px 0 10px;
|
||||
font-weight: 900;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* 관리제 페이지 상단 현페이지 정보 */
|
||||
.admin_top_wrap{
|
||||
height:110px;
|
||||
line-height: 110px;
|
||||
background-color: #5080bd;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.admin_top_wrap>span{
|
||||
margin-left: 30px;
|
||||
display:inline-block;
|
||||
color: white;
|
||||
font-size: 50px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
/* 관리자 wrap(네비+컨텐츠) */
|
||||
.admin_wrap{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* 관리자페이지 네비 영역 */
|
||||
.admin_navi_wrap{
|
||||
width: 20%;
|
||||
height: 300px;
|
||||
float:left;
|
||||
height: 100%;
|
||||
}
|
||||
.admin_navi_wrap li{
|
||||
display: block;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
.admin_navi_wrap li a{
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
font-size: 30px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.admin_navi_wrap li a:link {color: black;}
|
||||
.admin_navi_wrap li a:visited {color: black;}
|
||||
.admin_navi_wrap li a:active {color: black;}
|
||||
.admin_navi_wrap li a:hover {color: black;}
|
||||
|
||||
.admin_list_04{
|
||||
background-color: #c8c8c8;
|
||||
}
|
||||
|
||||
|
||||
/* 관리자페이지 컨텐츠 영역 */
|
||||
.admin_content_wrap{
|
||||
width: 80%;
|
||||
float:left;
|
||||
min-height:700px;
|
||||
}
|
||||
/* 관리자 컨텐츠 제목 영역 */
|
||||
.admin_content_subject{
|
||||
font-size: 40px;
|
||||
font-weight: bolder;
|
||||
padding-left: 15px;
|
||||
background-color: #6AAFE6;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
color: white;
|
||||
}
|
||||
/* 관리자 컨텐츠 메인 영역 */
|
||||
.form_section{
|
||||
width: 95%;
|
||||
margin-left: 2%;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #dbdde2;
|
||||
background-color: #efefef;
|
||||
}
|
||||
.form_section_title{
|
||||
padding: 20px 35px;
|
||||
}
|
||||
.form_section_title label{
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
}
|
||||
.form_section_content{
|
||||
padding: 20px 35px;
|
||||
border-top: 1px solid #dbdde2;
|
||||
}
|
||||
.form_section_content input{
|
||||
width: 98%;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
padding: 5px 1%;
|
||||
}
|
||||
.form_section_content textarea{
|
||||
width: 98%;
|
||||
height: 170px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.form_section_content select{
|
||||
width: 98%;
|
||||
height: 35px;
|
||||
font-size: 20px;
|
||||
text-align-last: center;
|
||||
}
|
||||
.input_block{
|
||||
background-color:#f9f9f9;
|
||||
}
|
||||
|
||||
|
||||
/* 버튼 영역 */
|
||||
.btn_section{
|
||||
text-align: center;
|
||||
margin: 80px 0;
|
||||
}
|
||||
.btn{
|
||||
min-width: 180px;
|
||||
padding: 4px 30px;
|
||||
font-size: 25px;
|
||||
font-weight: 600;
|
||||
line-height: 40px;
|
||||
}
|
||||
.modify_btn{
|
||||
background-color: #b8d3e8;
|
||||
margin-left:15px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* footer navai 영역 */
|
||||
.footer_nav{
|
||||
width:100%;
|
||||
height:50px;
|
||||
}
|
||||
.footer_nav_container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color:#8EC0E4;
|
||||
}
|
||||
.footer_nav_container>ul{
|
||||
font-weight : bold;
|
||||
float:left;
|
||||
list-style:none;
|
||||
position:relative;
|
||||
padding-top:10px;
|
||||
line-height: 27px;
|
||||
font-family: dotum;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.footer_nav_container>ul>li{
|
||||
display:inline;
|
||||
width: 45px;
|
||||
height: 19px;
|
||||
padding: 10px 9px 0 10px;
|
||||
}
|
||||
.footer_nav_container>ul>span{
|
||||
margin: 0 4px;
|
||||
}
|
||||
/* footer 영역 */
|
||||
.footer{
|
||||
width:100%;
|
||||
height:130px;
|
||||
background-color:#D4DFE6;
|
||||
padding-bottom : 50px;
|
||||
}
|
||||
.footer_container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
.footer_left>img {
|
||||
width: 150%;
|
||||
height: 130px;
|
||||
margin-left: -20px;
|
||||
margin-top: -12px;
|
||||
}
|
||||
.footer_left{
|
||||
float :left;
|
||||
width: 170px;
|
||||
margin-left: 20px;
|
||||
margin-top : 30px;
|
||||
|
||||
}
|
||||
.footer_right{
|
||||
float :left;
|
||||
width: 680px;
|
||||
margin-left: 70px;
|
||||
margin-top : 30px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* float 속성 해제 */
|
||||
.clearfix{
|
||||
clear: both;
|
||||
}
|
||||
@@ -137,8 +137,11 @@ ul{
|
||||
.th_column_5{
|
||||
width:140px;
|
||||
}
|
||||
|
||||
|
||||
/* 작가 상세 페이지 이동 태그 */
|
||||
.author_table a{
|
||||
color:#1088ed;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
/* 검색 영역 */
|
||||
|
||||
@@ -52,6 +52,7 @@ public class AuthorMapperTests {
|
||||
*/
|
||||
|
||||
/* 작가 총 수 */
|
||||
/*
|
||||
@Test
|
||||
public void authorGetTotalTest() throws Exception{
|
||||
|
||||
@@ -64,6 +65,19 @@ public class AuthorMapperTests {
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
@Test
|
||||
public void authorGetDetailTest() {
|
||||
|
||||
int authorId = 30;
|
||||
|
||||
AuthorVO author = mapper.authorGetDetail(authorId);
|
||||
|
||||
System.out.println("author......." + author);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ public class AuthorServiceTests {
|
||||
*/
|
||||
|
||||
/* 작가 목록 구현 */
|
||||
@Test
|
||||
/*
|
||||
@Test
|
||||
public void authorGetListTest() throws Exception{
|
||||
|
||||
Criteria cri = new Criteria(3, 10);
|
||||
@@ -47,5 +48,16 @@ public class AuthorServiceTests {
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/*작가 상세 페이지*/
|
||||
@Test
|
||||
public void authorGetDetailTest() throws Exception{
|
||||
|
||||
int authorId = 20;
|
||||
|
||||
System.out.println("author......" + service.authorGetDetail(authorId));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<![CDATA[
|
||||
select * from (
|
||||
select /*+INDEX_DESC(vam_author SYS_C007515) */
|
||||
select /*+INDEX_DESC(vam_author SYS_C007451) */
|
||||
rownum as rn, authorid, authorname, nationid, regdate, updatedate
|
||||
from vam_author
|
||||
where
|
||||
@@ -46,6 +46,13 @@
|
||||
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</select>
|
||||
|
||||
<!-- 작가 디테일 페이지 -->
|
||||
<select id="authorGetDetail" resultType="com.vam.model.AuthorVO">
|
||||
|
||||
select * from vam_author where authorid = #{authorId}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,5 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Mar 10 06:27:33 KST 2021
|
||||
#Mon Mar 15 03:58:10 KST 2021
|
||||
m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa
|
||||
m2e.projectName=VamPa
|
||||
groupId=com.vam
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
@@ -84,6 +85,20 @@ public class AdminController {
|
||||
return "redirect:/admin/authorManage";
|
||||
|
||||
}
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
@GetMapping("/authorDetail")
|
||||
public void authorGetInfoGET(int authorId, Criteria cri, Model model) throws Exception {
|
||||
|
||||
logger.info("authorDetail......." + authorId);
|
||||
|
||||
/* 작가 관리 페이지 정보 */
|
||||
model.addAttribute("cri", cri);
|
||||
|
||||
/* 선택 작가 정보 */
|
||||
model.addAttribute("authorInfo", authorService.authorGetDetail(authorId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ public interface AuthorMapper {
|
||||
public List<AuthorVO> authorGetList(Criteria cri);
|
||||
|
||||
/* 작가 총 수 */
|
||||
public int authorGetTotal(Criteria cri);
|
||||
public int authorGetTotal(Criteria cri);
|
||||
|
||||
/* 작가 상세 */
|
||||
public AuthorVO authorGetDetail(int authorId);
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,7 @@ public interface AuthorService {
|
||||
/* 작가 총 수 */
|
||||
public int authorGetTotal(Criteria cri) throws Exception;
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
public AuthorVO authorGetDetail(int authorId) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,4 +43,11 @@ public class AuthorServiceImpl implements AuthorService {
|
||||
return authorMapper.authorGetTotal(cri);
|
||||
}
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
@Override
|
||||
public AuthorVO authorGetDetail(int authorId) throws Exception {
|
||||
log.info("authorGetDetail........" + authorId);
|
||||
return authorMapper.authorGetDetail(authorId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,4 +38,12 @@
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 작가 디테일 페이지 -->
|
||||
<select id="authorGetDetail" resultType="com.vam.model.AuthorVO">
|
||||
|
||||
select * from vam_author where authorid = #{authorId}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
118
VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp
Normal file
118
VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp
Normal file
@@ -0,0 +1,118 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../resources/css/admin/authorDetail.css">
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.js"
|
||||
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
||||
crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<%@include file="../includes/admin/header.jsp" %>
|
||||
<div class="admin_content_wrap">
|
||||
<div class="admin_content_subject"><span>작가 상세</span></div>
|
||||
<div class="admin_content_main">
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>작가 번호</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" name="authorId" readonly="readonly" value="<c:out value='${authorInfo.authorId }'></c:out>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>작가 이름</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" name="authorName" readonly="readonly" value="<c:out value='${authorInfo.authorName }'></c:out>" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>소속 국가</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<select class="input_block" name="nationId" >
|
||||
<option value="none" selected disabled="disabled">=== 선택 ===</option>
|
||||
<option value="01" disabled="disabled" <c:out value=" ${authorInfo.nationId eq '01' ?'selected':''}"/>>국내</option>
|
||||
<option value="02" disabled="disabled" <c:out value=" ${authorInfo.nationId eq '02' ?'selected':''}"/>>국외</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>작가소개</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<textarea class="input_block" name="authorIntro" readonly="readonly"><c:out value='${authorInfo.authorIntro }'/></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>등록 날짜</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" type="text" readonly="readonly" value="<fmt:formatDate value="${authorInfo.regDate}" pattern="yyyy-MM-dd"/>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_section">
|
||||
<div class="form_section_title">
|
||||
<label>수정 날짜</label>
|
||||
</div>
|
||||
<div class="form_section_content">
|
||||
<input class="input_block" type="text" readonly="readonly" value="<fmt:formatDate value="${authorInfo.updateDate}" pattern="yyyy-MM-dd"/>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn_section">
|
||||
<button id="cancelBtn" class="btn">작가 목록</button>
|
||||
<button id="modifyBtn" class="btn modify_btn">수 정</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="moveForm" method="get">
|
||||
<input type="hidden" name="authorId" value='<c:out value="${authorInfo.authorId }"/>'>
|
||||
<input type="hidden" name="pageNum" value='<c:out value="${cri.pageNum }"/>'>
|
||||
<input type="hidden" name="amount" value='<c:out value="${cri.amount }"/>' >
|
||||
<input type="hidden" name="keyword" value='<c:out value="${cri.keyword }"/>'>
|
||||
</form>
|
||||
<%@include file="../includes/admin/footer.jsp" %>
|
||||
|
||||
<script>
|
||||
|
||||
let moveForm = $("#moveForm");
|
||||
|
||||
/* 작가 관리 페이지 이동 버튼 */
|
||||
$("#cancelBtn").on("click", function(e){
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$("input[name=authorId]").remove();
|
||||
moveForm.attr("action", "/admin/authorManage")
|
||||
moveForm.submit();
|
||||
|
||||
});
|
||||
|
||||
/* 작가 수정 페이지 이동 버튼 */
|
||||
$("#modifyBtn").on("click", function(e){
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
moveForm.attr("action", "/admin/authorModify");
|
||||
moveForm.submit();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -37,7 +37,11 @@
|
||||
<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>
|
||||
<a class="move" href='<c:out value="${list.authorId}"/>'>
|
||||
<c:out value="${list.authorName}"></c:out>
|
||||
</a>
|
||||
</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>
|
||||
@@ -157,6 +161,17 @@ $("#searchForm button").on("click", function(e){
|
||||
|
||||
});
|
||||
|
||||
/* 작가 상세 페이지 이동 */
|
||||
$(".move").on("click", function(e){
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
moveForm.append("<input type='hidden' name='authorId' value='"+ $(this).attr("href") + "'>");
|
||||
moveForm.attr("action", "/admin/authorDetail");
|
||||
moveForm.submit();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
239
VamPa_MySQL/src/main/webapp/resources/css/admin/authorDetail.css
Normal file
239
VamPa_MySQL/src/main/webapp/resources/css/admin/authorDetail.css
Normal file
@@ -0,0 +1,239 @@
|
||||
@charset "UTF-8";
|
||||
*{
|
||||
margin: 0;
|
||||
padding:0;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
ul{
|
||||
list-style: none;
|
||||
}
|
||||
/* 화면 전체 렙 */
|
||||
.wrapper{
|
||||
width: 100%;
|
||||
}
|
||||
/* content 랩 */
|
||||
.wrap{
|
||||
width : 1080px;
|
||||
margin: auto;
|
||||
}
|
||||
/* 홈페이지 기능 네비 */
|
||||
.top_gnb_area{
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background-color: #f0f0f1;
|
||||
position:relative;
|
||||
}
|
||||
.top_gnb_area .list{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0;
|
||||
|
||||
}
|
||||
.top_gnb_area .list li{
|
||||
list-style: none;
|
||||
float : left;
|
||||
padding: 13px 15px 0 10px;
|
||||
font-weight: 900;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* 관리제 페이지 상단 현페이지 정보 */
|
||||
.admin_top_wrap{
|
||||
height:110px;
|
||||
line-height: 110px;
|
||||
background-color: #5080bd;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.admin_top_wrap>span{
|
||||
margin-left: 30px;
|
||||
display:inline-block;
|
||||
color: white;
|
||||
font-size: 50px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
/* 관리자 wrap(네비+컨텐츠) */
|
||||
.admin_wrap{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* 관리자페이지 네비 영역 */
|
||||
.admin_navi_wrap{
|
||||
width: 20%;
|
||||
height: 300px;
|
||||
float:left;
|
||||
height: 100%;
|
||||
}
|
||||
.admin_navi_wrap li{
|
||||
display: block;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
.admin_navi_wrap li a{
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
font-size: 30px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.admin_navi_wrap li a:link {color: black;}
|
||||
.admin_navi_wrap li a:visited {color: black;}
|
||||
.admin_navi_wrap li a:active {color: black;}
|
||||
.admin_navi_wrap li a:hover {color: black;}
|
||||
|
||||
.admin_list_04{
|
||||
background-color: #c8c8c8;
|
||||
}
|
||||
|
||||
|
||||
/* 관리자페이지 컨텐츠 영역 */
|
||||
.admin_content_wrap{
|
||||
width: 80%;
|
||||
float:left;
|
||||
min-height:700px;
|
||||
}
|
||||
/* 관리자 컨텐츠 제목 영역 */
|
||||
.admin_content_subject{
|
||||
font-size: 40px;
|
||||
font-weight: bolder;
|
||||
padding-left: 15px;
|
||||
background-color: #6AAFE6;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
color: white;
|
||||
}
|
||||
/* 관리자 컨텐츠 메인 영역 */
|
||||
.form_section{
|
||||
width: 95%;
|
||||
margin-left: 2%;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #dbdde2;
|
||||
background-color: #efefef;
|
||||
}
|
||||
.form_section_title{
|
||||
padding: 20px 35px;
|
||||
}
|
||||
.form_section_title label{
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
}
|
||||
.form_section_content{
|
||||
padding: 20px 35px;
|
||||
border-top: 1px solid #dbdde2;
|
||||
}
|
||||
.form_section_content input{
|
||||
width: 98%;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
padding: 5px 1%;
|
||||
}
|
||||
.form_section_content textarea{
|
||||
width: 98%;
|
||||
height: 170px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.form_section_content select{
|
||||
width: 98%;
|
||||
height: 35px;
|
||||
font-size: 20px;
|
||||
text-align-last: center;
|
||||
}
|
||||
.input_block{
|
||||
background-color:#f9f9f9;
|
||||
}
|
||||
|
||||
|
||||
/* 버튼 영역 */
|
||||
.btn_section{
|
||||
text-align: center;
|
||||
margin: 80px 0;
|
||||
}
|
||||
.btn{
|
||||
min-width: 180px;
|
||||
padding: 4px 30px;
|
||||
font-size: 25px;
|
||||
font-weight: 600;
|
||||
line-height: 40px;
|
||||
}
|
||||
.modify_btn{
|
||||
background-color: #b8d3e8;
|
||||
margin-left:15px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* footer navai 영역 */
|
||||
.footer_nav{
|
||||
width:100%;
|
||||
height:50px;
|
||||
}
|
||||
.footer_nav_container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color:#8EC0E4;
|
||||
}
|
||||
.footer_nav_container>ul{
|
||||
font-weight : bold;
|
||||
float:left;
|
||||
list-style:none;
|
||||
position:relative;
|
||||
padding-top:10px;
|
||||
line-height: 27px;
|
||||
font-family: dotum;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.footer_nav_container>ul>li{
|
||||
display:inline;
|
||||
width: 45px;
|
||||
height: 19px;
|
||||
padding: 10px 9px 0 10px;
|
||||
}
|
||||
.footer_nav_container>ul>span{
|
||||
margin: 0 4px;
|
||||
}
|
||||
/* footer 영역 */
|
||||
.footer{
|
||||
width:100%;
|
||||
height:130px;
|
||||
background-color:#D4DFE6;
|
||||
padding-bottom : 50px;
|
||||
}
|
||||
.footer_container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
.footer_left>img {
|
||||
width: 150%;
|
||||
height: 130px;
|
||||
margin-left: -20px;
|
||||
margin-top: -12px;
|
||||
}
|
||||
.footer_left{
|
||||
float :left;
|
||||
width: 170px;
|
||||
margin-left: 20px;
|
||||
margin-top : 30px;
|
||||
|
||||
}
|
||||
.footer_right{
|
||||
float :left;
|
||||
width: 680px;
|
||||
margin-left: 70px;
|
||||
margin-top : 30px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* float 속성 해제 */
|
||||
.clearfix{
|
||||
clear: both;
|
||||
}
|
||||
@@ -137,8 +137,11 @@ ul{
|
||||
.th_column_5{
|
||||
width:140px;
|
||||
}
|
||||
|
||||
|
||||
/* 작가 상세 페이지 이동 태그 */
|
||||
.author_table a{
|
||||
color:#1088ed;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
/* 검색 영역 */
|
||||
|
||||
@@ -52,6 +52,7 @@ public class AuthorMapperTests {
|
||||
*/
|
||||
|
||||
/* 작가 총 수 */
|
||||
/*
|
||||
@Test
|
||||
public void authorGetTotalTest() throws Exception{
|
||||
|
||||
@@ -64,5 +65,19 @@ public class AuthorMapperTests {
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/* 작가 상세 페이지 */
|
||||
@Test
|
||||
public void authorGetDetailTest() {
|
||||
|
||||
int authorId = 30;
|
||||
|
||||
AuthorVO author = mapper.authorGetDetail(authorId);
|
||||
|
||||
System.out.println("author......." + author);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import com.vam.model.AuthorVO;
|
||||
import com.vam.model.Criteria;
|
||||
|
||||
import jdk.internal.org.jline.utils.Log;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("file:src/main/webapp/WEB-INF/spring/root-context.xml")
|
||||
public class AuthorServiceTests {
|
||||
@@ -18,7 +20,7 @@ public class AuthorServiceTests {
|
||||
/*AuthoreService 의존성 주입*/
|
||||
@Autowired
|
||||
private AuthorService service;
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void authorEnrollTest() throws Exception {
|
||||
|
||||
@@ -30,10 +32,12 @@ public class AuthorServiceTests {
|
||||
|
||||
service.authorEnroll(author);
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* 작가 목록 구현 */
|
||||
@Test
|
||||
/*
|
||||
@Test
|
||||
public void authorGetListTest() throws Exception{
|
||||
|
||||
Criteria cri = new Criteria(3, 10);
|
||||
@@ -44,6 +48,18 @@ public class AuthorServiceTests {
|
||||
System.out.println("list" + i + "......." + list.get(i));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*작가 상세 페이지*/
|
||||
@Test
|
||||
public void authorGetDetailTest() throws Exception{
|
||||
|
||||
int authorId = 20;
|
||||
|
||||
Log.info("author......" + service.authorGetDetail(authorId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -38,4 +38,12 @@
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 작가 디테일 페이지 -->
|
||||
<select id="authorGetDetail" resultType="com.vam.model.AuthorVO">
|
||||
|
||||
select * from vam_author where authorid = #{authorId}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,5 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Wed Mar 10 06:27:34 KST 2021
|
||||
#Mon Mar 15 03:58:12 KST 2021
|
||||
m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa_MySQL
|
||||
m2e.projectName=VamPa_MySQL
|
||||
groupId=com.vam
|
||||
|
||||
Reference in New Issue
Block a user