공지사항, 자주하는질문 : 중간 커밋
This commit is contained in:
parent
2db5dd9bb6
commit
e99528ea7c
37
data/dataxml/uac.service.board.faq.list_GET.xml
Normal file
37
data/dataxml/uac.service.board.faq.list_GET.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- uac.service.board.qna_GET.xml -->
|
||||
<result>
|
||||
<page>1</page>
|
||||
<totPages>15</totPages>
|
||||
<records>125</records>
|
||||
<results>
|
||||
<articleNo>1</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<articleGubun>Q</articleGubun>
|
||||
<articleType>101</articleType>
|
||||
<articleTypeName>회원가입</articleTypeName>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>2</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<articleGubun>Q</articleGubun>
|
||||
<articleType>101</articleType>
|
||||
<articleTypeName>회원가입</articleTypeName>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>3</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<articleGubun>Q</articleGubun>
|
||||
<articleType>101</articleType>
|
||||
<articleTypeName>회원가입</articleTypeName>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>4</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<articleGubun>Q</articleGubun>
|
||||
<articleType>101</articleType>
|
||||
<articleTypeName>회원가입</articleTypeName>
|
||||
</results>
|
||||
|
||||
</result>
|
||||
|
||||
13
data/dataxml/uac.service.board.faq_GET.xml
Normal file
13
data/dataxml/uac.service.board.faq_GET.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- uac.service.board.qna_GET.xml -->
|
||||
<result>
|
||||
<!-- 상세내용 -->
|
||||
<articleNo>5</articleNo>
|
||||
<faqType>101</faqType>
|
||||
<faqTypeName>회원가입</faqTypeName>
|
||||
<title>FAQ 테스트</title>
|
||||
<readCount>15</readCount>
|
||||
<regDate>2021-07-19</regDate>
|
||||
<content>정확한 답변을 드립니다.</content>
|
||||
</result>
|
||||
|
||||
81
data/dataxml/uac.service.board.notice.list_GET.xml
Normal file
81
data/dataxml/uac.service.board.notice.list_GET.xml
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<result>
|
||||
<page>1</page>
|
||||
<totPages>15</totPages>
|
||||
<records>125</records>
|
||||
<results>
|
||||
<noticeTop>Y</noticeTop>
|
||||
<articleNo>1</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<noticeTop>Y</noticeTop>
|
||||
<articleNo>2</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<noticeTop>Y</noticeTop>
|
||||
<articleNo>3</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>4</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>102</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>5</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>102</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>6</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
<new>Y</new>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>7</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>8</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>9</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>10</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<regUserName>공길동</regUserName>
|
||||
<articleType>101</articleType>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
</result>
|
||||
|
||||
45
data/dataxml/uac.service.board.notice_GET.xml
Normal file
45
data/dataxml/uac.service.board.notice_GET.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- uac.service.board.qna_GET.xml -->
|
||||
<result>
|
||||
<!-- 상세내용 -->
|
||||
<articleNo>5</articleNo>
|
||||
<articleType>101</articleType>
|
||||
<articleTypeName>공지</articleTypeName>
|
||||
<title>공지사항 테스트</title>
|
||||
<articlePassword>9uCh4qxBlFqap/+KiqoM68EqO8yYGpKa1c+BCgkOEa4=</articlePassword> <!-- 111 -->
|
||||
<!-- <articlePassword>kac/2AarLABcE7TcGRMKiE6Qneo/ctRuMCZv4aH1iNg=</articlePassword> --> <!-- 555 -->
|
||||
<readCount>15</readCount>
|
||||
<regDate>2021-07-19</regDate>
|
||||
<regUserName>김아무</regUserName>
|
||||
<repStatus>답변완료</repStatus>
|
||||
<email>myid@digitalship.co.kr</email>
|
||||
<contentNotice>질문이 있습니다.</contentNotice>
|
||||
<contentNoticeFile>F20210802052436092_0A84FA72B1B1478ABEB285536B81B587=엑셀샘플.xlsx;F20210802052436092_F1DB407F181A4B8AAA0859E56D4EDB57=엑셀샘플2.xlsx;</contentNoticeFile>
|
||||
<contentReply>이렇게 답변 드립니다.</contentReply>
|
||||
<contentReplyFile>F20210802052436092_0A84FA72B1B1478ABEB285536B81B587=엑셀샘플3.xlsx;F20210802052436092_F1DB407F181A4B8AAA0859E56D4EDB57=엑셀샘플4.xlsx;</contentReplyFile>
|
||||
|
||||
<!-- 이전글, 다음글 -->
|
||||
<page>1</page>
|
||||
<totPages>1</totPages>
|
||||
<records>2</records>
|
||||
<results>
|
||||
<articleNo>4</articleNo>
|
||||
<articleType>101</articleType>
|
||||
<articleTypeName>공지</articleTypeName>
|
||||
<title>이전의 글제목입니다.</title>
|
||||
<regDate>2021-07-19</regDate>
|
||||
<regUserName>김아무</regUserName>
|
||||
<repStatus>답변완료</repStatus>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>6</articleNo>
|
||||
<articleType>102</articleType>
|
||||
<articleTypeName>공지</articleTypeName>
|
||||
<title>다음의 글제목입니다.</title>
|
||||
<regDate>2021-07-20</regDate>
|
||||
<regUserName>홍아무</regUserName>
|
||||
<repStatus>답변완료</repStatus>
|
||||
</results>
|
||||
|
||||
</result>
|
||||
|
||||
@ -7,70 +7,70 @@
|
||||
<results>
|
||||
<articleNo>1</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>2</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>3</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>4</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>대기</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>5</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>대기</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>6</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>7</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>8</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>9</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
<results>
|
||||
<articleNo>10</articleNo>
|
||||
<title>질문있습니다.</title>
|
||||
<writerName>김길동</writerName>
|
||||
<regUserName>김길동</regUserName>
|
||||
<replyStatus>답변완료</replyStatus>
|
||||
<regDate>2021-07-19</regDate>
|
||||
</results>
|
||||
|
||||
17
data/dataxml/uac.service.code.list.ARTICLE_TYPE_GET.xml
Normal file
17
data/dataxml/uac.service.code.list.ARTICLE_TYPE_GET.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<result>
|
||||
<records>3</records>
|
||||
<results>
|
||||
<code>101</code>
|
||||
<name>공지</name>
|
||||
</results>
|
||||
<results>
|
||||
<code>102</code>
|
||||
<name>자료</name>
|
||||
</results>
|
||||
<results>
|
||||
<code>103</code>
|
||||
<name>모집</name>
|
||||
</results>
|
||||
</result>
|
||||
|
||||
17
data/dataxml/uac.service.code.list.FAQE_TYPE_GET.xml
Normal file
17
data/dataxml/uac.service.code.list.FAQE_TYPE_GET.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<result>
|
||||
<records>3</records>
|
||||
<results>
|
||||
<code>101</code>
|
||||
<name>회원가입</name>
|
||||
</results>
|
||||
<results>
|
||||
<code>102</code>
|
||||
<name>대출</name>
|
||||
</results>
|
||||
<results>
|
||||
<code>103</code>
|
||||
<name>열람</name>
|
||||
</results>
|
||||
</result>
|
||||
|
||||
@ -28,14 +28,29 @@ import nlib.restful.service.DataApiResVO;
|
||||
*/
|
||||
public interface BoardService
|
||||
{
|
||||
/**
|
||||
* 공지사항
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
public DataApiResVO listNotices(DataApiReqVO reqVO);
|
||||
|
||||
public DataApiResVO selectNotice(DataApiReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 자주하는질문
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
public DataApiResVO listFAQs(DataApiReqVO reqVO);
|
||||
|
||||
public DataApiResVO selectFAQ(DataApiReqVO reqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 묻고답하기 목록 조회한다.
|
||||
* 묻고답하기
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
|
||||
@ -18,20 +18,29 @@ public class BoardDAO extends DataApi
|
||||
/**
|
||||
* 주 자원의 URI
|
||||
*/
|
||||
public static final String RESOURCE_URI = "/uac/service/board/qna";
|
||||
public static final String RESOURCE_URI = "/uac/service/board";
|
||||
|
||||
public DataApiResVO listNotices(DataApiReqVO reqVO) {
|
||||
return null;
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/notice/list");
|
||||
return get(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO selectNotice(DataApiReqVO reqVO) {
|
||||
return null;
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/notice");
|
||||
return get(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO listFAQs(DataApiReqVO reqVO) {
|
||||
return null;
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/faq/list");
|
||||
return get(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO selectFAQ(DataApiReqVO reqVO) {
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/faq");
|
||||
return get(reqVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 묻고답하기 목록 조회한다.
|
||||
*
|
||||
@ -39,12 +48,12 @@ public class BoardDAO extends DataApi
|
||||
* @return
|
||||
*/
|
||||
public DataApiResVO listQnAs(DataApiReqVO reqVO) {
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/list");
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/qna/list");
|
||||
return get(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
||||
reqVO.setReqUrl(RESOURCE_URI);
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||
return get(reqVO);
|
||||
}
|
||||
|
||||
@ -53,17 +62,17 @@ public class BoardDAO extends DataApi
|
||||
}
|
||||
|
||||
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
||||
reqVO.setReqUrl(RESOURCE_URI);
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||
return post(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
||||
reqVO.setReqUrl(RESOURCE_URI);
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||
return delete(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
||||
reqVO.setReqUrl(RESOURCE_URI);
|
||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||
return put(reqVO);
|
||||
}
|
||||
|
||||
|
||||
@ -21,15 +21,19 @@ public class BoardServiceImpl implements BoardService
|
||||
|
||||
|
||||
public DataApiResVO listNotices(DataApiReqVO reqVO) {
|
||||
return null;
|
||||
return boardDAO.listNotices(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO selectNotice(DataApiReqVO reqVO) {
|
||||
return null;
|
||||
return boardDAO.selectNotice(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO listFAQs(DataApiReqVO reqVO) {
|
||||
return null;
|
||||
return boardDAO.listFAQs(reqVO);
|
||||
}
|
||||
|
||||
public DataApiResVO selectFAQ(DataApiReqVO reqVO) {
|
||||
return boardDAO.selectFAQ(reqVO);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -61,17 +61,96 @@ public class BoardController extends NlibCommonController
|
||||
@Autowired
|
||||
private AuthenticationManager authenticationManager;
|
||||
|
||||
/**
|
||||
* 공지사항 목록 화면을 표출한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/listNotices.do")
|
||||
public String listNotices(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
||||
String articleType = paramMap.get("articleType");
|
||||
String message = paramMap.get("message");
|
||||
|
||||
log.debug("listNotices > pageIndex = " + pageIndex);
|
||||
log.debug("listNotices > pageSize = " + pageSize);
|
||||
log.debug("listNotices > searchKeyword = " + searchKeyword);
|
||||
log.debug("listNotices > articleType = " + articleType);
|
||||
log.debug("listNotices > message = " + message);
|
||||
|
||||
DataApiReqVO reqVOforCode = new DataApiReqVO();
|
||||
reqVOforCode.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVOforCode.setPageIndex(0);
|
||||
reqVOforCode.setPageSize(0);
|
||||
// 페이징 사이즈 코드 목록 조회
|
||||
reqVOforCode.addInfoItem("codeUpperId", "PAGE_SIZE");
|
||||
DataApiResVO resVOforPageSize = codeService.listCodes(reqVOforCode);
|
||||
|
||||
// 공지사항 유형 코드 목록 조회
|
||||
reqVOforCode.addInfoItem("codeUpperId", "ARTICLE_TYPE");
|
||||
DataApiResVO resVOforArticleType = codeService.listCodes(reqVOforCode);
|
||||
|
||||
// 반환 정보
|
||||
model.addAttribute("pageIndex" , pageIndex);
|
||||
model.addAttribute("pageSize" , pageSize);
|
||||
model.addAttribute("searchKeyword", searchKeyword);
|
||||
model.addAttribute("pageSizeCodes", resVOforPageSize.getList());
|
||||
model.addAttribute("articleTypeCodes", resVOforArticleType.getList());
|
||||
model.addAttribute("articleType" , articleType);
|
||||
model.addAttribute("message" , message);
|
||||
|
||||
return "nlib/board/listNotices";
|
||||
}
|
||||
|
||||
/**
|
||||
* 공지사항 목록 조회한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@RequestMapping("/board/listNotices.do")
|
||||
public String listNotices(HttpServletRequest req) {
|
||||
@RequestMapping(value="/board/listNoticesAjax.do")
|
||||
public ResponseEntity<String> listNoticesAjax(HttpServletRequest req,
|
||||
Authentication authentication, @RequestBody Map<String, String> paramMap) {
|
||||
|
||||
return "nlib/board/listNotices";
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
||||
String articleType = paramMap.get("articleType");
|
||||
|
||||
log.debug("listNoticesAjax > pageIndex = " + pageIndex);
|
||||
log.debug("listNoticesAjax > pageSize = " + pageSize);
|
||||
log.debug("listNoticesAjax > searchKeyword = " + searchKeyword);
|
||||
log.debug("listNoticesAjax > articleType = " + articleType);
|
||||
|
||||
//-------------------------------
|
||||
// REQ VO 구성
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.setPageIndex(pageIndex);
|
||||
reqVO.setPageSize(pageSize);
|
||||
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||
reqVO.addInfoItem("articleType", articleType);
|
||||
|
||||
// 요청
|
||||
DataApiResVO resVO = boardService.listNotices(reqVO);
|
||||
|
||||
//-------------------------------
|
||||
// JSON변환 응답 처리
|
||||
//-------------------------------
|
||||
// JS-GRID 페이징 처리를 포함한 응답값 처리
|
||||
// {data: [{...}],
|
||||
// itemsCount: 255
|
||||
// }
|
||||
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
||||
retMap.put("data", resVO.getList());
|
||||
retMap.put("itemsCount", resVO.getRecordTotCount());
|
||||
|
||||
return makeResponseEntityJson(retMap);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,23 +159,172 @@ public class BoardController extends NlibCommonController
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/selectNotice.do")
|
||||
public String selectNotice(HttpServletRequest req) {
|
||||
public String selectNotice(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
// 목록 이동시 전달할 매개변수
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
String pageIndex = paramMap.get("pageIndex");
|
||||
String pageSize = paramMap.get("pageSize");
|
||||
String articleType = paramMap.get("articleType");
|
||||
String message = paramMap.get("message");
|
||||
|
||||
// 게시물 번호
|
||||
String articleNo = paramMap.get("articleNo");
|
||||
|
||||
log.debug("selectNotice > pageIndex = " + pageIndex);
|
||||
log.debug("selectNotice > pageSize = " + pageSize);
|
||||
log.debug("selectNotice > searchKeyword = " + searchKeyword);
|
||||
log.debug("selectNotice > articleNo = " + articleNo);
|
||||
log.debug("selectNotice > message = " + message);
|
||||
log.debug("selectNotice > articleType = " + articleType);
|
||||
|
||||
//-------------------------------
|
||||
// REQ VO 구성
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.setPageIndex(pageIndex);
|
||||
reqVO.setPageSize(pageSize);
|
||||
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
||||
reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
||||
|
||||
// 요청
|
||||
DataApiResVO resVO = boardService.selectNotice(reqVO);
|
||||
|
||||
// 반환 정보
|
||||
model.addAttribute("articleNo" , articleNo);
|
||||
model.addAttribute("article" , resVO.getInfo()); // 게시물 상세
|
||||
model.addAttribute("preArticle" , resVO.getList().get(0)); // 이전글 정보
|
||||
model.addAttribute("nextArticle" , resVO.getList().get(1)); // 다음글 정보
|
||||
model.addAttribute("message" , message);
|
||||
model.addAttribute("pageIndex" , pageIndex);
|
||||
model.addAttribute("pageSize" , pageSize);
|
||||
model.addAttribute("searchKeyword", searchKeyword);
|
||||
model.addAttribute("articleType" , articleType);
|
||||
|
||||
return "nlib/board/selectNotice";
|
||||
}
|
||||
|
||||
/**
|
||||
* FAQ 목록 화면을 표출한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/listFAQs.do")
|
||||
public String listFAQs(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
||||
String message = paramMap.get("message");
|
||||
String faqType = paramMap.get("faqType");
|
||||
|
||||
log.debug("listFAQs > pageIndex = " + pageIndex);
|
||||
log.debug("listFAQs > pageSize = " + pageSize);
|
||||
log.debug("listFAQs > searchKeyword = " + searchKeyword);
|
||||
log.debug("listFAQs > message = " + message);
|
||||
log.debug("listFAQs > faqType = " + faqType);
|
||||
|
||||
// 페이징 사이즈 코드 목록 조회
|
||||
DataApiReqVO reqVOforCode = new DataApiReqVO();
|
||||
reqVOforCode.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVOforCode.setPageIndex(pageIndex);
|
||||
reqVOforCode.setPageSize(pageSize);
|
||||
reqVOforCode.addInfoItem("codeUpperId", "FAQ_TYPE");
|
||||
DataApiResVO resVOforPageSize = codeService.listCodes(reqVOforCode);
|
||||
|
||||
// 반환 정보
|
||||
model.addAttribute("pageIndex" , pageIndex);
|
||||
model.addAttribute("pageSize" , pageSize);
|
||||
model.addAttribute("searchKeyword", searchKeyword);
|
||||
model.addAttribute("faqTypeCodes" , resVOforPageSize.getList());
|
||||
model.addAttribute("message" , message);
|
||||
model.addAttribute("faqType" , faqType);
|
||||
|
||||
return "nlib/board/listFAQs";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* FAQ 목록 조회한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/listFAQs.do")
|
||||
public String listFAQs(HttpServletRequest req) {
|
||||
return "nlib/board/listFAQs";
|
||||
@RequestMapping(value="/board/listFAQsAjax.do")
|
||||
public ResponseEntity<String> listFAQsAjax(HttpServletRequest req,
|
||||
Authentication authentication, @RequestBody Map<String, String> paramMap) {
|
||||
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
||||
String faqType = paramMap.get("faqType");
|
||||
|
||||
log.debug("listFAQsAjax > pageIndex = " + pageIndex);
|
||||
log.debug("listFAQsAjax > pageSize = " + pageSize);
|
||||
log.debug("listFAQsAjax > searchKeyword = " + searchKeyword);
|
||||
log.debug("listFAQsAjax > faqType = " + faqType);
|
||||
|
||||
//-------------------------------
|
||||
// REQ VO 구성
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.setPageIndex(pageIndex);
|
||||
reqVO.setPageSize(pageSize);
|
||||
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||
reqVO.addInfoItem("faqType", faqType);
|
||||
|
||||
// 요청
|
||||
DataApiResVO resVO = boardService.listFAQs(reqVO);
|
||||
|
||||
//-------------------------------
|
||||
// JSON변환 응답 처리
|
||||
//-------------------------------
|
||||
// JS-GRID 페이징 처리를 포함한 응답값 처리
|
||||
// {data: [{...}],
|
||||
// itemsCount: 255
|
||||
// }
|
||||
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
||||
retMap.put("data", resVO.getList());
|
||||
retMap.put("itemsCount", resVO.getRecordTotCount());
|
||||
|
||||
return makeResponseEntityJson(retMap);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 묻고답하기 상세 내용 조회한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/selectFAQAjax.do")
|
||||
public ResponseEntity<String> selectFAQAjax(HttpServletRequest req, Authentication authentication, @RequestBody Map<String, String> paramMap) {
|
||||
|
||||
// 게시물 번호
|
||||
String articleNo = paramMap.get("articleNo");
|
||||
|
||||
log.debug("selectQnA > articleNo = " + articleNo);
|
||||
|
||||
//-------------------------------
|
||||
// REQ VO 구성
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
||||
reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
||||
|
||||
// 요청
|
||||
DataApiResVO resVO = boardService.selectFAQ(reqVO);
|
||||
|
||||
// 반환 정보
|
||||
return makeResponseEntityJson(resVO.getInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 묻고답하기 목록 조회 화면을 구성한다.
|
||||
* 묻고답하기 목록 화면을 표출한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
@ -117,7 +345,8 @@ public class BoardController extends NlibCommonController
|
||||
// 페이징 사이즈 코드 목록 조회
|
||||
DataApiReqVO reqVOforPageSize = new DataApiReqVO();
|
||||
reqVOforPageSize.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVOforPageSize.setPageSize(0);
|
||||
reqVOforPageSize.setPageIndex(pageIndex);
|
||||
reqVOforPageSize.setPageSize(pageSize);
|
||||
reqVOforPageSize.addInfoItem("codeUpperId", "PAGE_SIZE");
|
||||
DataApiResVO resVOforPageSize = codeService.listCodes(reqVOforPageSize);
|
||||
|
||||
@ -247,6 +476,15 @@ public class BoardController extends NlibCommonController
|
||||
return "nlib/board/insertQnAForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 묻고답하기 등록 처리한다.
|
||||
*
|
||||
* @param req
|
||||
* @param authentication
|
||||
* @param paramMap
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/insertQnA.do")
|
||||
public String insertQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
@ -325,6 +563,15 @@ public class BoardController extends NlibCommonController
|
||||
return "nlib/board/verifyWriter";
|
||||
}
|
||||
|
||||
/**
|
||||
* 묻고답하기 수정 화면 표출한다.
|
||||
*
|
||||
* @param req
|
||||
* @param authentication
|
||||
* @param paramMap
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/updateQnAForm.do")
|
||||
public String updateQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
@ -394,6 +641,15 @@ public class BoardController extends NlibCommonController
|
||||
return "nlib/board/updateQnAForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 묻고답하기 수정 처리한다.
|
||||
*
|
||||
* @param req
|
||||
* @param authentication
|
||||
* @param paramMap
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/updateQnA.do")
|
||||
public String updateQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
@ -486,6 +742,15 @@ public class BoardController extends NlibCommonController
|
||||
return "redirect:/board/selectQnA.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 묻고답하기 삭제한다.
|
||||
*
|
||||
* @param req
|
||||
* @param authentication
|
||||
* @param paramMap
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/deleteQnA.do")
|
||||
public String deleteQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<%
|
||||
/**
|
||||
* <pre>
|
||||
* @Class Name : getSampleInfo.jsp
|
||||
* @Class Name : listFAQs.jsp
|
||||
*
|
||||
* @Description : RESTful API 호출 샘플
|
||||
* @Description : FAQ 목록 화면
|
||||
*
|
||||
*
|
||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||
@ -13,71 +13,210 @@
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 2021. 6. 15. KNKIM 최초 생성
|
||||
* @ 2021. 8. 3. KNKIM 최초 생성
|
||||
*
|
||||
*
|
||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||
* @since 2021. 6. 15.
|
||||
* @since 2021. 8. 3.
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||
<c:set var="pageTitle">QRCode 회원정보</c:set>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>${pageTitle}</title>
|
||||
<c:set var="pageTitle">FAQ</c:set>
|
||||
|
||||
<!-- W2UI -->
|
||||
<link rel="stylesheet" type="text/css" href="/nlib/js/w2ui/w2ui-nlib.css" />
|
||||
<script type="text/javascript" src="/nlib/js/w2ui/w2ui-1.5.min.js"></script>
|
||||
</head>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<title>${pageTitle}</title>
|
||||
|
||||
<body>
|
||||
<!-- javascript warning tag -->
|
||||
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
|
||||
<form:form commandName="reqInfo"
|
||||
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
|
||||
target="_blank"
|
||||
onSubmit="fncAuthorInsert(document.forms[0]); return false;">
|
||||
<!-- GRID -->
|
||||
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
|
||||
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
|
||||
|
||||
<div id="grid" style="width: 100%; height: 250px;"></div>
|
||||
<script type="text/javaScript" language="javascript">
|
||||
|
||||
</form:form>
|
||||
$( document ).ready(function() {
|
||||
|
||||
//=======================================================
|
||||
// 그리드 생성 환경설정
|
||||
//=======================================================
|
||||
$("#jsGrid").jsGrid({
|
||||
pageSize : $("#pageSize").val(),
|
||||
controller: {
|
||||
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
|
||||
var data = $.Deferred();
|
||||
//======================================
|
||||
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
|
||||
//======================================
|
||||
var reqUrl = "${pageContext.request.contextPath}/board/listFAQsAjax.do";
|
||||
var faqType = document.articleForm.faqType.value;
|
||||
var searchKeyword = document.articleForm.searchKeyword.value;
|
||||
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
|
||||
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
|
||||
|
||||
$("#pageIndex").val(pageIndex);
|
||||
|
||||
var inputData = {
|
||||
"searchKeyword" : searchKeyword
|
||||
, "pageIndex" : pageIndex
|
||||
, "pageSize": pageSize
|
||||
, "faqType": faqType};
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
// 요청 처리
|
||||
//--------------------------------------
|
||||
$.ajax({
|
||||
type: "post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: reqUrl,
|
||||
dataType: "json",
|
||||
data: JSON.stringify(inputData),
|
||||
}).done(function(response){
|
||||
<%
|
||||
// 그리드 데이터 예시 :
|
||||
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
|
||||
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
|
||||
%>
|
||||
data.resolve(JSON.parse(response));
|
||||
});
|
||||
return data.promise();
|
||||
} // loadData
|
||||
},
|
||||
|
||||
<script type="text/javaScript" language="javascript">
|
||||
$(function () {
|
||||
$('#grid').w2grid({
|
||||
name: 'grid',
|
||||
header: 'List of Names',
|
||||
columns: [
|
||||
{ field: 'fname', text: '이름', size: '30%' },
|
||||
{ field: 'lname', text: '성명', size: '30%' },
|
||||
{ field: 'email', text: '이메일', size: '40%' },
|
||||
{ field: 'sdate', text: '시작일자', size: '120px' }
|
||||
],
|
||||
records: [
|
||||
{ recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' },
|
||||
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' },
|
||||
{ recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' },
|
||||
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' },
|
||||
{ recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' },
|
||||
{ recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' }
|
||||
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
|
||||
|
||||
// 클릭된 행의 자료 객체
|
||||
var getData = args.item;
|
||||
|
||||
// 추출할 컬럼의 데이터 가져오기
|
||||
var articleNo = getData["articleNo"];
|
||||
var selectedRow = $("#jsGrid").find('table tr.highlight');
|
||||
|
||||
// 상세 내용 보기
|
||||
fn_viewDetail(articleNo, selectedRow);
|
||||
},
|
||||
|
||||
//======================================
|
||||
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
|
||||
//======================================
|
||||
fields: [
|
||||
{ title:"구분", name: "articleGubun" , type: "text", width: 100, align: "center"},
|
||||
{ title:"유형", name: "faqType" , type: "text", width: 100, align: "center"},
|
||||
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" }
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
// 페이지 크기 변경시 재조회
|
||||
$("#pageSize").on("change", function(e) {
|
||||
fn_searchArticle($("#pageSize").val(), 1);
|
||||
});
|
||||
|
||||
// 검색 버튼 클릭
|
||||
$("#btnSearch").on("click", function(e) {
|
||||
fn_searchArticle($("#pageSize").val(), 1);
|
||||
});
|
||||
|
||||
//초기 자료 조회
|
||||
fn_searchArticle();
|
||||
|
||||
}); // document ready
|
||||
|
||||
|
||||
// 선택한 게시글 상세 보기로 이동
|
||||
function fn_viewDetail(articleNo, selectedRow) {
|
||||
|
||||
var $selectedRow = $(selectedRow);
|
||||
var reqUrl = "${pageContext.request.contextPath}/board/selectFAQAjax.do";
|
||||
|
||||
var searchKeyword = document.articleForm.searchKeyword.value;
|
||||
var pageIndex = $("#pageIndex").val();
|
||||
var pageSize = $("#pageSize").val();
|
||||
var faqType = document.articleForm.faqType.value;
|
||||
var inputData = {
|
||||
"searchKeyword" : searchKeyword
|
||||
, "pageIndex" : pageIndex
|
||||
, "pageSize": pageSize
|
||||
, "faqType": faqType};
|
||||
|
||||
//--------------------------------------
|
||||
// 요청 처리
|
||||
//--------------------------------------
|
||||
$.ajax({
|
||||
type: "post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: reqUrl,
|
||||
dataType: "json",
|
||||
data: JSON.stringify(inputData),
|
||||
}).done(function(response){
|
||||
$selectedRow.css("color","red");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 게시글 작성으로 이동
|
||||
function fn_newArticle() {
|
||||
$("#articleNo").val("");
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertFAQForm.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 그리드 데이터 조회 호출
|
||||
function fn_searchArticle(pageSize, pageIndex) {
|
||||
$("#jsGrid").jsGrid("search"
|
||||
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
|
||||
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>${pageTitle }</h1>
|
||||
|
||||
메시지 : ${message}
|
||||
<br/>
|
||||
<form name="articleForm" id="articleForm"
|
||||
action="${pageContext.request.contextPath}/board/listFAQs.do"
|
||||
method="post">
|
||||
|
||||
<!-- 검색조건 -->
|
||||
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
|
||||
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
|
||||
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<select name="faqType" id="faqType" title="공지사항 유형">
|
||||
<option value="">유형</option>
|
||||
<c:forEach var="faqTypeItem" items="${faqTypeCodes}" varStatus="status">
|
||||
<option value="<c:out value="${faqTypeItem.code }" />" <c:if test="${faqTypeItem.code == faqType }">selected</c:if> ><c:out value="${faqTypeItem.name }" /></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
|
||||
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
|
||||
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
|
||||
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
|
||||
|
||||
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
|
||||
|
||||
|
||||
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* <pre>
|
||||
* @Class Name : listNotices.jsp
|
||||
*
|
||||
* @Description : JS-GRID 샘플 화면
|
||||
* @Description : 공지사항 목록을 조회한다.
|
||||
*
|
||||
*
|
||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||
@ -34,7 +34,7 @@
|
||||
<c:set var="pageTitle">공지사항</c:set>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<title>${pageTitle}</title>
|
||||
|
||||
@ -43,104 +43,191 @@
|
||||
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
|
||||
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
|
||||
|
||||
<script type="text/javaScript" language="javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
var MyDateField = function(config) {
|
||||
jsGrid.Field.call(this, config);
|
||||
};
|
||||
|
||||
MyDateField.prototype = new jsGrid.Field({
|
||||
sorter: function(date1, date2) {
|
||||
return new Date(date1) - new Date(date2);
|
||||
},
|
||||
|
||||
itemTemplate: function(value) {
|
||||
return new Date(value).toDateString();
|
||||
},
|
||||
|
||||
insertTemplate: function(value) {
|
||||
return this._insertPicker = $("<input>").datepicker({ defaultDate: new Date() });
|
||||
},
|
||||
|
||||
editTemplate: function(value) {
|
||||
return this._editPicker = $("<input>").datepicker().datepicker("setDate", new Date(value));
|
||||
},
|
||||
|
||||
insertValue: function() {
|
||||
return this._insertPicker.datepicker("getDate").toISOString();
|
||||
},
|
||||
|
||||
editValue: function() {
|
||||
return this._editPicker.datepicker("getDate").toISOString();
|
||||
}
|
||||
});
|
||||
|
||||
jsGrid.fields.myDateField = MyDateField;
|
||||
|
||||
//=======================================================
|
||||
// 그리드 생성 환경설정
|
||||
//=======================================================
|
||||
$("#jsGrid").jsGrid({
|
||||
pageSize : $("#pageSize").val(),
|
||||
controller: {
|
||||
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
|
||||
var data = $.Deferred();
|
||||
//======================================
|
||||
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
|
||||
//======================================
|
||||
var reqUrl = "${pageContext.request.contextPath}/board/listNoticesAjax.do";
|
||||
var articleType = document.articleForm.articleType.value;
|
||||
var searchKeyword = document.articleForm.searchKeyword.value;
|
||||
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
|
||||
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
|
||||
|
||||
$("#pageIndex").val(pageIndex);
|
||||
|
||||
var inputData = {
|
||||
"searchKeyword" : searchKeyword
|
||||
, "pageIndex" : pageIndex
|
||||
, "pageSize": pageSize
|
||||
, "articleType": articleType};
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
// 요청 처리
|
||||
//--------------------------------------
|
||||
$.ajax({
|
||||
type: "post",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: reqUrl,
|
||||
dataType: "json",
|
||||
data: JSON.stringify(inputData),
|
||||
}).done(function(response){
|
||||
<%
|
||||
// 그리드 데이터 예시 :
|
||||
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
|
||||
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
|
||||
%>
|
||||
data.resolve(JSON.parse(response));
|
||||
});
|
||||
return data.promise();
|
||||
} // loadData
|
||||
},
|
||||
|
||||
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
|
||||
|
||||
// 클릭된 행의 자료 객체
|
||||
var getData = args.item;
|
||||
|
||||
// 추출할 컬럼의 데이터 가져오기
|
||||
var articleNo = getData["articleNo"];
|
||||
|
||||
// 상세 내용 보기
|
||||
fn_viewDetail(articleNo);
|
||||
},
|
||||
|
||||
//======================================
|
||||
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
|
||||
//======================================
|
||||
fields: [
|
||||
{ title:"상시공지", name: "noticeTop", type: "text", width: 50, align: "center"},
|
||||
{ title:"번호", name: "articleNo" , type: "number", width: 50, align: "center"},
|
||||
{ title:"유형", name: "articleType" , type: "text", width: 100, align: "center"},
|
||||
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" },
|
||||
{ title:"작성자", name: "regUserName", type: "text", width: 50, align: "center" },
|
||||
{ title:"등록일", name: "regDate" , type: "text", width: 100, align: "center"},
|
||||
{ title:"최근", name: "new" , type: "text", width: 100, align: "center"}
|
||||
]
|
||||
});
|
||||
|
||||
// 페이지 크기 변경시 재조회
|
||||
$("#pageSize").on("change", function(e) {
|
||||
fn_searchArticle($("#pageSize").val(), 1);
|
||||
});
|
||||
|
||||
// 검색 버튼 클릭
|
||||
$("#btnSearch").on("click", function(e) {
|
||||
fn_searchArticle($("#pageSize").val(), 1);
|
||||
});
|
||||
|
||||
//초기 자료 조회
|
||||
fn_searchArticle();
|
||||
|
||||
}); // document ready
|
||||
|
||||
|
||||
// 선택한 게시글 상세 보기로 이동
|
||||
function fn_viewDetail(articleNo) {
|
||||
$("#articleNo").val(articleNo);
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 게시글 작성으로 이동
|
||||
function fn_newArticle() {
|
||||
$("#articleNo").val("");
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertNoticeForm.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 그리드 데이터 조회 호출
|
||||
function fn_searchArticle(pageSize, pageIndex) {
|
||||
$("#jsGrid").jsGrid("search"
|
||||
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
|
||||
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form:form commandName="reqInfo"
|
||||
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
|
||||
target="_blank"
|
||||
onSubmit="fncAuthorInsert(document.forms[0]); return false;">
|
||||
|
||||
<div id="jsGrid" name="jsGrid" ></div>
|
||||
<h1>${pageTitle }</h1>
|
||||
|
||||
</form:form>
|
||||
메시지 : ${message}
|
||||
<br/>
|
||||
<form name="articleForm" id="articleForm"
|
||||
action="${pageContext.request.contextPath}/board/listNotices.do"
|
||||
method="post">
|
||||
|
||||
<!-- 검색조건 -->
|
||||
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
|
||||
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
|
||||
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<select name="articleType" id="articleType" title="공지사항 유형">
|
||||
<option value="">유형</option>
|
||||
<c:forEach var="articleTypeItem" items="${articleTypeCodes}" varStatus="status">
|
||||
<option value="<c:out value="${articleTypeItem.code }" />" <c:if test="${articleTypeItem.code == articleType }">selected</c:if> ><c:out value="${articleTypeItem.name }" /></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
|
||||
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
|
||||
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
|
||||
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
|
||||
|
||||
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
|
||||
|
||||
|
||||
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
|
||||
|
||||
<script type="text/javaScript" language="javascript">
|
||||
|
||||
// 그리드 데이터
|
||||
var clients = [
|
||||
{ "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 2, "noticeType": "02", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 3, "noticeType": "03", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 4, "noticeType": "04", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 5, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 6, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 7, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
{ "noticeNo": 9, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }
|
||||
];
|
||||
|
||||
// 그리드내 콤보박스 값
|
||||
var noticeTypes = [
|
||||
{ Name: "공지" , Id: "01" },
|
||||
{ Name: "자료" , Id: "02" },
|
||||
{ Name: "모집" , Id: "03" },
|
||||
{ Name: "입찰" , Id: "04" },
|
||||
{ Name: "발표" , Id: "05" },
|
||||
{ Name: "이벤트", Id: "06" }
|
||||
];
|
||||
|
||||
// 그리드 생성
|
||||
$("#jsGrid").jsGrid({
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
|
||||
inserting: false,
|
||||
editing: false,
|
||||
sorting: true,
|
||||
paging: true,
|
||||
pageSize: 10,
|
||||
pageButtonCount: 10,
|
||||
pageIndex: 1,
|
||||
pageFirstText: " << ",
|
||||
pagePrevText: " < ",
|
||||
pageLastText: " >> ",
|
||||
pageNextText: " > ",
|
||||
pagerFormat: "{first} {prev} {pages} {next} {last}",
|
||||
|
||||
data: clients,
|
||||
|
||||
fields: [
|
||||
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"},
|
||||
{ title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" },
|
||||
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" },
|
||||
{ title:"조회수", name: "readCount", type: "number", width: 50, align: "center" },
|
||||
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
194
src/main/webapp/WEB-INF/jsp/nlib/board/selectNotice.jsp
Normal file
194
src/main/webapp/WEB-INF/jsp/nlib/board/selectNotice.jsp
Normal file
@ -0,0 +1,194 @@
|
||||
<%
|
||||
/**
|
||||
* <pre>
|
||||
* @Class Name : selectNotice.jsp
|
||||
*
|
||||
* @Description : 공지사항 상세내용을 조회한다.
|
||||
*
|
||||
*
|
||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 2021. 7. 22. KNKIM 최초 생성
|
||||
*
|
||||
*
|
||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||
* @since 2021. 7. 22.
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||
|
||||
<c:set var="pageTitle">공지사항 - 상세조회</c:set>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<title>${pageTitle}</title>
|
||||
|
||||
<script type="text/javaScript" language="javascript">
|
||||
|
||||
// 이전글/다음글 상세 보기로 이동
|
||||
function fn_view_detail(articleNo) {
|
||||
$("#articleNo").val(articleNo);
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 목록으로 이동
|
||||
function fn_list() {
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listNotices.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 수정 화면 이동
|
||||
function fn_updateForm(passwd) {
|
||||
if(passwd == null || passwd == "") {
|
||||
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#articlePassword").val(passwd);
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateNoticeForm.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 수정위한 비밀번호 확인
|
||||
function fn_updatePassword() {
|
||||
fn_promptPassword("수정을 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_updateForm")
|
||||
}
|
||||
|
||||
// 삭제위한 비밀번호 확인
|
||||
function fn_deletePassword() {
|
||||
fn_promptPassword("삭제를 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_delete")
|
||||
}
|
||||
|
||||
// 삭제 처리
|
||||
function fn_delete(passwd) {
|
||||
if(passwd == null || passwd == "") {
|
||||
alert("삭제를 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#articlePassword").val(passwd);
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/deleteNotice.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
|
||||
// 파일 다운로드
|
||||
function fn_downloadFile(fid, fname) {
|
||||
|
||||
if(fid == null || fid.trim().length < 1) {
|
||||
alert("파일정보를 확인해 주시기 바랍니다.[1]");
|
||||
return;
|
||||
}
|
||||
|
||||
if(fname == null || fname.trim().length < 1) {
|
||||
alert("파일정보를 확인해 주시기 바랍니다.[2]");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#fid").val(fid);
|
||||
$("#fname").val(fname);
|
||||
$("#downloadFileForm").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>${pageTitle }</h1>
|
||||
|
||||
메시지 : <span style="color:red;">${message }</span>
|
||||
<br />
|
||||
|
||||
<form name="articleForm" id="articleForm"
|
||||
action="${pageContext.request.contextPath}/board/listNotices.do"
|
||||
method="post">
|
||||
|
||||
<!-- HIDDEN 영역 : 시작 -->
|
||||
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
|
||||
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${pageSize}" readonly />
|
||||
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
|
||||
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
|
||||
<input type="text" name="articleType" id="articleType" title="유형" value="${articleType}" readonly />
|
||||
<!-- HIDDEN 영역 : 종료 -->
|
||||
|
||||
<table class="table_content" style="width:100% !important; margin-top: 20px;">
|
||||
<tr>
|
||||
<th>유형</th>
|
||||
<td>${article.articleTypeName }</td>
|
||||
<th>작성일</th>
|
||||
<td>${article.regDate }</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="1">제목</th>
|
||||
<td colspan="3">${article.title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="1">질문내용</th>
|
||||
<td colspan="3">${article.contentNotice}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<%
|
||||
// 파일정보 : 저장파일ID=원파일명
|
||||
%>
|
||||
<c:set var="contentNoticeFileList" value="${fn:split(article.contentNoticeFile,';')}" />
|
||||
<c:forEach var="contentNoticeFileItem" items="${contentNoticeFileList }">
|
||||
<c:set var="fInfo" value="${fn:split(contentNoticeFileItem,'=')}" />
|
||||
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
|
||||
</c:forEach>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
|
||||
<table class="table_content" style="width:100% !important;">
|
||||
<tr>
|
||||
<th>이전글</th>
|
||||
<td>${preArticle.articleTypeName }</td>
|
||||
<td><a href="javascript:void(0)" onclick="fn_view_detail('${preArticle.articleNo }')">${preArticle.title }</a></td>
|
||||
<th>작성일 : ${preArticle.regDate }</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>다음글</th>
|
||||
<td>${nextArticle.articleTypeName }</td>
|
||||
<td><a href="javascript:void(0)" onclick="fn_view_detail('${nextArticle.articleNo }')">${nextArticle.title }</a></td>
|
||||
<th>작성일 : ${nextArticle.regDate }</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 관련 작업 버튼 -->
|
||||
<button type="button" name="btnList" id="btnList" class="float"
|
||||
onclick="fn_list()">목록</button>
|
||||
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<!-- 첨부파일 다운로드용 폼 -->
|
||||
<form name="downloadFileForm" id="downloadFileForm"
|
||||
action="${pageContext.request.contextPath}/fileupload/downloadFiles.do"
|
||||
method="post">
|
||||
<input type="text" name="subPathKey" id="subPathKey" value="fileupload.bbs.qna.subpath" readonly />
|
||||
<input type="text" name="fid" id="fid" value="" readonly />
|
||||
<input type="text" name="fname" id="fname" value="" readonly />
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -124,6 +124,7 @@ function fn_downloadFile(fid, fname) {
|
||||
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${pageSize}" readonly />
|
||||
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
|
||||
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
|
||||
<input type="text" name="articleType" id="articleType" title="유형" value="${articleType}" readonly />
|
||||
<input type="text" name="articlePassword" id="articlePassword" title="글비밀번호" value="${articlePassword}" readonly />
|
||||
<!-- HIDDEN 영역 : 종료 -->
|
||||
|
||||
@ -156,7 +157,17 @@ function fn_downloadFile(fid, fname) {
|
||||
<td colspan="4">${article.contentReply}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">${article.contentReplyFile}</td>
|
||||
<td colspan="4">
|
||||
<%
|
||||
// 파일정보 : 저장파일ID=원파일명
|
||||
%>
|
||||
<c:set var="contentReplyFileList" value="${fn:split(article.contentReplyFile,';')}" />
|
||||
<c:forEach var="contentReplyFileItem" items="${contentReplyFileList }">
|
||||
<c:set var="fInfo" value="${fn:split(contentReplyFileItem,'=')}" />
|
||||
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
|
||||
</c:forEach>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user