Compare commits

..

No commits in common. "84185f8df4d3ab071df3a45565850fbab6079a9e" and "7843f9344b8b2a39cef457487a5217e986a41de7" have entirely different histories.

12 changed files with 199 additions and 244 deletions

View File

@ -49,8 +49,10 @@ public class PublicBoardController {
ModelAndView mav = new ModelAndView("publicBoard/board/boardPage");
publicBoard.setQueryInfo();
publicBoard.setPublicType("PLB002");
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");
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");
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,19 +104,31 @@ 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());
}else{
break;
}
}
if (publicBoard.getPublicKey() == null) {
publicBoard.setWrtOrgan(loginUser.getOgCd());
publicBoard.setWrtPart(loginUser.getOfcCd());
publicBoard.setWrtUserSeq(loginUser.getUserSeq());

View File

@ -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">

View File

@ -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">

View File

@ -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>

View File

@ -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}">

View File

@ -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}">

View File

@ -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">

View File

@ -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>

View File

@ -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}">

View File

@ -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">

View File

@ -10,11 +10,6 @@
<div layout:fragment="content">
<main class="pt-3">
<h4>자료실</h4>
<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">
@ -22,7 +17,12 @@
</li>
</th:block>
</ul>
<div class="tab-content border border-top-0 p-3" id="userContent">
<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">
<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}">
@ -66,21 +66,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="reference:${referenceList}">
<input type="hidden" class="planKey" th:value="${reference.publicKey}">
<td><input type="checkbox" class="trChkBox"></td>
@ -91,9 +90,6 @@
<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:block th:each="commonCode:${session.commonCode.get('JT')}">
<td th:if="${reference.wrtUserGrd 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>
@ -140,7 +136,6 @@
</div>
</div>
</div>
</div>
</main>
<div class="modal fade" id="editModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="editModalLabel" aria-hidden="true">

View File

@ -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}">