Compare commits
No commits in common. "84185f8df4d3ab071df3a45565850fbab6079a9e" and "7843f9344b8b2a39cef457487a5217e986a41de7" have entirely different histories.
84185f8df4
...
7843f9344b
|
|
@ -49,8 +49,10 @@ public class PublicBoardController {
|
|||
ModelAndView mav = new ModelAndView("publicBoard/board/boardPage");
|
||||
publicBoard.setQueryInfo();
|
||||
publicBoard.setPublicType("PLB002");
|
||||
publicBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
if (loginUser.getUserRole().contains(Role.SUB_ADMIN.getValue())) {
|
||||
publicBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
}
|
||||
publicBoard.setUpOrganCdList(loginUser.getUpOrganCdList());
|
||||
mav.addObject("boardList", publicBoardService.selectContentList(publicBoard));
|
||||
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||
|
|
@ -65,8 +67,10 @@ public class PublicBoardController {
|
|||
ModelAndView mav = new ModelAndView("publicBoard/reference/referencePage");
|
||||
publicBoard.setQueryInfo();
|
||||
publicBoard.setPublicType("PLB003");
|
||||
publicBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
if (loginUser.getUserRole().contains(Role.SUB_ADMIN.getValue())) {
|
||||
publicBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
}
|
||||
publicBoard.setUpOrganCdList(loginUser.getUpOrganCdList());
|
||||
mav.addObject("referenceList", publicBoardService.selectContentList(publicBoard));
|
||||
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||
|
|
@ -82,8 +86,10 @@ public class PublicBoardController {
|
|||
ModelAndView mav = new ModelAndView("publicBoard/qna/qnaPage");
|
||||
publicBoard.setQueryInfo();
|
||||
publicBoard.setPublicType("PLB004");
|
||||
publicBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
if (loginUser.getUserRole().contains(Role.SUB_ADMIN.getValue())) {
|
||||
publicBoard.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||
}
|
||||
mav.addObject("qnaList", publicBoardService.selectContentList(publicBoard));
|
||||
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||
publicBoard.setPaginationInfo();
|
||||
|
|
@ -98,79 +104,91 @@ public class PublicBoardController {
|
|||
switch (publicBoard.getPublicType()) {
|
||||
case "PLB001": // 공지사항
|
||||
mav = new ModelAndView("publicBoard/notice/noticeEditModal");
|
||||
if (publicBoard.getPublicKey() != null) {
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
}
|
||||
break;
|
||||
case "PLB002": // 공용게시판
|
||||
mav = new ModelAndView("publicBoard/board/boardEditModal");
|
||||
if (publicBoard.getPublicKey() != null) {
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
}
|
||||
break;
|
||||
case "PLB003": // 자료실
|
||||
mav = new ModelAndView("publicBoard/reference/referenceEditModal");
|
||||
if (publicBoard.getPublicKey() != null) {
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
}
|
||||
break;
|
||||
case "PLB004": // Q&A
|
||||
mav = new ModelAndView("publicBoard/qna/qnaEditModal");
|
||||
if (publicBoard.getPublicKey() != null) {
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (publicBoard.getPublicKey() != null) {
|
||||
|
||||
if (publicBoard.getPublicKey() == null) {
|
||||
publicBoard.setWrtOrgan(loginUser.getOgCd());
|
||||
publicBoard.setWrtPart(loginUser.getOfcCd());
|
||||
publicBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||
publicBoard.setWrtUserGrd(loginUser.getTitleCd());
|
||||
publicBoard.setWrtUserNm(loginUser.getUserNm());
|
||||
publicBoard.setWrtDt(LocalDateTime.now());
|
||||
}
|
||||
mav.addObject("info", publicBoard);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/viewModal")
|
||||
public ModelAndView viewModal (@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard){
|
||||
ModelAndView mav = null;
|
||||
switch (publicBoard.getPublicType()) {
|
||||
case "PLB001": // 공지사항
|
||||
mav = new ModelAndView("publicBoard/notice/noticeViewModal");
|
||||
break;
|
||||
case "PLB002": // 공용게시판
|
||||
mav = new ModelAndView("publicBoard/board/boardViewModal");
|
||||
break;
|
||||
case "PLB003": // 자료실
|
||||
mav = new ModelAndView("publicBoard/reference/referenceViewModal");
|
||||
break;
|
||||
case "PLB004": // Q&A
|
||||
mav = new ModelAndView("publicBoard/qna/qnaViewModal");
|
||||
break;
|
||||
}
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
}else{
|
||||
publicBoard.setWrtOrgan(loginUser.getOgCd());
|
||||
publicBoard.setWrtPart(loginUser.getOfcCd());
|
||||
publicBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||
publicBoard.setWrtUserGrd(loginUser.getTitleCd());
|
||||
publicBoard.setWrtUserNm(loginUser.getUserNm());
|
||||
publicBoard.setWrtDt(LocalDateTime.now());
|
||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||
mav.addObject("info", publicBoard);
|
||||
return mav;
|
||||
}
|
||||
mav.addObject("info", publicBoard);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/viewModal")
|
||||
public ModelAndView viewModal (@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard){
|
||||
ModelAndView mav = null;
|
||||
switch (publicBoard.getPublicType()) {
|
||||
case "PLB001": // 공지사항
|
||||
mav = new ModelAndView("publicBoard/notice/noticeViewModal");
|
||||
break;
|
||||
case "PLB002": // 공용게시판
|
||||
mav = new ModelAndView("publicBoard/board/boardViewModal");
|
||||
break;
|
||||
case "PLB003": // 자료실
|
||||
mav = new ModelAndView("publicBoard/reference/referenceViewModal");
|
||||
break;
|
||||
case "PLB004": // Q&A
|
||||
mav = new ModelAndView("publicBoard/qna/qnaViewModal");
|
||||
break;
|
||||
@PostMapping("/saveContent")
|
||||
public Integer saveContent (PublicBoard publicBoard,
|
||||
MultipartHttpServletRequest request,
|
||||
@RequestParam(value = "fileSeq", required = false) List < Integer > deleteFileSeq){
|
||||
publicBoard.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||
return publicBoardService.saveContent(publicBoard, deleteFileSeq);
|
||||
}
|
||||
@PostMapping("/saveComment")
|
||||
public ModelAndView saveComment (@AuthenticationPrincipal UserInfo loginUser, PublicComment comment){
|
||||
comment.setWrtOrgan(loginUser.getOgCd());
|
||||
comment.setWrtPart(loginUser.getOfcCd());
|
||||
comment.setWrtUserSeq(loginUser.getUserSeq());
|
||||
comment.setWrtUserGrd(loginUser.getTitleCd());
|
||||
comment.setWrtUserNm(loginUser.getUserNm());
|
||||
comment.setWrtDt(LocalDateTime.now());
|
||||
publicBoardService.saveComment(comment);
|
||||
ModelAndView mav = new ModelAndView("publicBoard/commentDiv");
|
||||
mav.addObject("comment", comment);
|
||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||
return mav;
|
||||
}
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||
mav.addObject("info", publicBoard);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/saveContent")
|
||||
public Integer saveContent (PublicBoard publicBoard,
|
||||
MultipartHttpServletRequest request,
|
||||
@RequestParam(value = "fileSeq", required = false) List < Integer > deleteFileSeq){
|
||||
publicBoard.setMultipartFileList(request.getMultiFileMap().get("uploadFiles"));
|
||||
return publicBoardService.saveContent(publicBoard, deleteFileSeq);
|
||||
@PostMapping("/deleteComment")
|
||||
@ResponseBody
|
||||
public void deleteComment (@RequestBody PublicComment comment){
|
||||
publicBoardService.deleteComment(comment.getPublicKey(), comment.getCommentKey());
|
||||
}
|
||||
}
|
||||
@PostMapping("/saveComment")
|
||||
public ModelAndView saveComment (@AuthenticationPrincipal UserInfo loginUser, PublicComment comment){
|
||||
comment.setWrtOrgan(loginUser.getOgCd());
|
||||
comment.setWrtPart(loginUser.getOfcCd());
|
||||
comment.setWrtUserSeq(loginUser.getUserSeq());
|
||||
comment.setWrtUserGrd(loginUser.getTitleCd());
|
||||
comment.setWrtUserNm(loginUser.getUserNm());
|
||||
comment.setWrtDt(LocalDateTime.now());
|
||||
publicBoardService.saveComment(comment);
|
||||
ModelAndView mav = new ModelAndView("publicBoard/commentDiv");
|
||||
mav.addObject("comment", comment);
|
||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/deleteComment")
|
||||
@ResponseBody
|
||||
public void deleteComment (@RequestBody PublicComment comment){
|
||||
publicBoardService.deleteComment(comment.getPublicKey(), comment.getCommentKey());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="ko"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
|
||||
<header th:fragment="headerFragment" class="border-bottom w-100 row justify-content-between py-1 px-3">
|
||||
<header th:fragment="headerFragment" class="border-bottom row justify-content-between py-1 px-3">
|
||||
<div class="col-auto row justify-content-start">
|
||||
<div class="col-auto">
|
||||
<div class="navbar-header">
|
||||
|
|
|
|||
|
|
@ -13,16 +13,10 @@
|
|||
<input type="hidden" name="wrtOrgan" th:value="${info.wrtOrgan}">
|
||||
<input type="hidden" name="wrtPart" th:value="${info.wrtPart}">
|
||||
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
|
||||
<input type="hidden" name="wrtUserGrd" th:value="${info.wrtUserGrd}">
|
||||
<input type="hidden" name="wrtUserNm" th:value="${info.wrtUserNm}">
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
|
||||
<input type="text" class="form-control" id="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<input type="text" class="form-control" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
|
|||
|
|
@ -56,21 +56,20 @@
|
|||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-hover table-bordered">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>제목</th>
|
||||
<th>관서</th>
|
||||
<th>부서</th>
|
||||
<th>계급</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일시</th>
|
||||
<th>첨부파일</th>
|
||||
<th>댓글</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tbody>
|
||||
<tr class="planTr" th:each="board:${boardList}">
|
||||
<input type="hidden" class="planKey" th:value="${board.publicKey}">
|
||||
<td><input type="checkbox" class="trChkBox"></td>
|
||||
|
|
@ -81,9 +80,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<td th:if="${board.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<td th:if="${board.wrtUserGrd eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<td th:text="${board.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(board.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
<td th:text="${board.fileCnt eq null?'파일 없음':#strings.concat(board.fileCnt,' 건')}"></td>
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@
|
|||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-1 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
|
||||
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
@ -98,9 +94,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${comment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(comment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto">
|
||||
|
|
@ -128,9 +121,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${childComment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(childComment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto" th:if="${userSeq eq childComment.wrtUserSeq}">
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${comment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(comment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto" th:if="${userSeq eq comment.wrtUserSeq}">
|
||||
|
|
|
|||
|
|
@ -13,16 +13,10 @@
|
|||
<input type="hidden" name="wrtOrgan" th:value="${info.wrtOrgan}">
|
||||
<input type="hidden" name="wrtPart" th:value="${info.wrtPart}">
|
||||
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
|
||||
<input type="hidden" name="wrtUserGrd" th:value="${info.wrtUserGrd}">
|
||||
<input type="hidden" name="wrtUserNm" th:value="${info.wrtUserNm}">
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
|
||||
<input type="text" class="form-control" id="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<input type="text" class="form-control" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
|
|||
|
|
@ -57,21 +57,20 @@
|
|||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-hover table-bordered">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>제목</th>
|
||||
<th>관서</th>
|
||||
<th>부서</th>
|
||||
<th>계급</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일시</th>
|
||||
<th>첨부파일</th>
|
||||
<th>댓글</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tbody>
|
||||
<tr class="planTr" th:each="qna:${qnaList}">
|
||||
<input type="hidden" class="planKey" th:value="${qna.publicKey}">
|
||||
<td><input type="checkbox" class="trChkBox"></td>
|
||||
|
|
@ -82,9 +81,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<td th:if="${qna.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<td th:if="${qna.wrtUserGrd eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<td th:text="${qna.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(qna.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
<td th:text="${qna.fileCnt eq null?'파일 없음':#strings.concat(qna.fileCnt,' 건')}"></td>
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@
|
|||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-1 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
|
||||
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
@ -98,9 +94,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${comment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(comment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto">
|
||||
|
|
@ -128,9 +121,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${childComment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(childComment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto" th:if="${userSeq eq childComment.wrtUserSeq}">
|
||||
|
|
|
|||
|
|
@ -13,16 +13,10 @@
|
|||
<input type="hidden" name="wrtOrgan" th:value="${info.wrtOrgan}">
|
||||
<input type="hidden" name="wrtPart" th:value="${info.wrtPart}">
|
||||
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
|
||||
<input type="hidden" name="wrtUserGrd" th:value="${info.wrtUserGrd}">
|
||||
<input type="hidden" name="wrtUserNm" th:value="${info.wrtUserNm}">
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
|
||||
<input type="text" class="form-control" id="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<input type="text" class="form-control" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
|
|||
|
|
@ -10,128 +10,123 @@
|
|||
<div layout:fragment="content">
|
||||
<main class="pt-3">
|
||||
<h4>자료실</h4>
|
||||
<ul class="nav nav-tabs" id="boardTab" role="tablist">
|
||||
<th:block th:each="tab:${tabStatusList}">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link referenceTab" th:data-tabcd="${tab.itemCd}" th:classappend="${tab.itemCd eq searchParams.tabStatus?'active':''}" data-bs-toggle="tab" type="button" role="tab" th:text="${tab.itemValue}"></button>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<div class="row mx-0">
|
||||
<div class="col-12 card text-center">
|
||||
<div class="card-body">
|
||||
<ul class="nav nav-tabs" id="boardTab" role="tablist">
|
||||
<th:block th:each="tab:${tabStatusList}">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link referenceTab" th:data-tabcd="${tab.itemCd}" th:classappend="${tab.itemCd eq searchParams.tabStatus?'active':''}" data-bs-toggle="tab" type="button" role="tab" th:text="${tab.itemValue}"></button>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
<div class="tab-content border border-top-0 p-3" id="userContent">
|
||||
<form method="get" th:action="@{/publicBoard/referencePage}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<input type="hidden" name="tabStatus" th:value="${searchParams.tabStatus}">
|
||||
<div class="row justify-content-between pe-3 py-1">
|
||||
<div class="col-auto">
|
||||
<select class="form-select" name="rowCnt" id="rowCnt">
|
||||
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-auto" sec:authorize="hasRole('ROLE_SUB_ADMIN')">
|
||||
<select class="form-select form-select-sm" name="wrtOrgan">
|
||||
<option value="">관서 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd
|
||||
<form method="get" th:action="@{/publicBoard/referencePage}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<input type="hidden" name="tabStatus" th:value="${searchParams.tabStatus}">
|
||||
<div class="row justify-content-between pe-3 py-1">
|
||||
<div class="col-auto">
|
||||
<select class="form-select" name="rowCnt" id="rowCnt">
|
||||
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-auto" sec:authorize="hasRole('ROLE_SUB_ADMIN')">
|
||||
<select class="form-select form-select-sm" name="wrtOrgan">
|
||||
<option value="">관서 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd
|
||||
)}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
|
||||
</th:block>
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>제목</th>
|
||||
<th>관서</th>
|
||||
<th>부서</th>
|
||||
<th>계급</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일시</th>
|
||||
<th>첨부파일</th>
|
||||
<th>댓글</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tr class="planTr" th:each="reference:${referenceList}">
|
||||
<input type="hidden" class="planKey" th:value="${reference.publicKey}">
|
||||
<td><input type="checkbox" class="trChkBox"></td>
|
||||
<td th:text="${reference.title}"></td>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<td th:if="${reference.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>제목</th>
|
||||
<th>관서</th>
|
||||
<th>부서</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일시</th>
|
||||
<th>첨부파일</th>
|
||||
<th>댓글</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="planTr" th:each="reference:${referenceList}">
|
||||
<input type="hidden" class="planKey" th:value="${reference.publicKey}">
|
||||
<td><input type="checkbox" class="trChkBox"></td>
|
||||
<td th:text="${reference.title}"></td>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<td th:if="${reference.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<td th:if="${reference.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<td th:text="${reference.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(reference.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
<td th:text="${reference.fileCnt eq null?'파일 없음':#strings.concat(reference.fileCnt,' 건')}"></td>
|
||||
<td th:text="${reference.commentCnt eq null?'0':reference.commentCnt}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto"></div>
|
||||
<div class="col-auto">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<th:block th:if="${searchParams.pageIndex>3}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
||||
<a class="page-link" href="#" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<td th:if="${reference.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
||||
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
||||
<a class="page-link" href="#" th:text="${num}"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<td th:if="${reference.wrtUserGrd eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
||||
<a class="page-link" href="#" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
<td th:text="${reference.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(reference.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
<td th:text="${reference.fileCnt eq null?'파일 없음':#strings.concat(reference.fileCnt,' 건')}"></td>
|
||||
<td th:text="${reference.commentCnt eq null?'0':reference.commentCnt}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto"></div>
|
||||
<div class="col-auto">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<th:block th:if="${searchParams.pageIndex>3}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
||||
<a class="page-link" href="#" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
||||
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
||||
<a class="page-link" href="#" th:text="${num}"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
||||
<a class="page-link" href="#" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="등록" id="addReferenceBtn">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="등록" id="addReferenceBtn">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,14 +8,11 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="publicKeyKey" id="viewModalPublicKey" th:value="${info.publicKey}">
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-1 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
|
||||
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<input type="text" class="form-control border-0" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
@ -105,9 +102,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${comment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(comment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto">
|
||||
|
|
@ -135,9 +129,6 @@
|
|||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<div class="col-auto" th:text="${childComment.wrtUserNm}"></div>
|
||||
<div class="col-auto" th:text="|작성일시: ${#temporals.format(childComment.wrtDt, 'yyyy-MM-dd HH:mm')}|"></div>
|
||||
<div class="col-auto" th:if="${userSeq eq childComment.wrtUserSeq}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue