공통게시판 수정2
parent
dc091550bc
commit
d18eff2b47
|
|
@ -0,0 +1,20 @@
|
|||
let files = [];
|
||||
|
||||
$(document).on('click', '#addBoardBtn', function (){
|
||||
getEditModal(null, "PLB002")
|
||||
})
|
||||
|
||||
$(document).on('click', '.planTr', function (){
|
||||
$(".trChkBox").prop("checked", false);
|
||||
$(this).find(".trChkBox").prop("checked", true);
|
||||
getViewModal(Number($(this).find(".planKey").val()), "PLB002");
|
||||
})
|
||||
|
||||
$(document).on('click', '#saveBtn', function (){
|
||||
savePublicBoard("boardEditForm", "PLB002")
|
||||
})
|
||||
|
||||
$(document).on('click', '#editBtn', function (){
|
||||
$("#viewModal").modal('hide')
|
||||
getEditModal($("#viewModalPublicKey").val(), "PLB002")
|
||||
})
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
let files = [];
|
||||
|
||||
$(function(){
|
||||
$("#dateSelectorDiv").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko"
|
||||
});
|
||||
})
|
||||
|
||||
$(document).on('click', '#addQnaBtn', function (){
|
||||
getEditModal(null, "PLB004")
|
||||
})
|
||||
|
||||
$(document).on('click', '.planTr', function (){
|
||||
$(".trChkBox").prop("checked", false);
|
||||
$(this).find(".trChkBox").prop("checked", true);
|
||||
getViewModal(Number($(this).find(".planKey").val()), "PLB004");
|
||||
})
|
||||
|
||||
$(document).on('click', '#saveBtn', function (){
|
||||
savePublicBoard("qnaEditForm", "PLB004")
|
||||
})
|
||||
|
||||
$(document).on('click', '#editBtn', function (){
|
||||
$("#viewModal").modal('hide')
|
||||
getEditModal($("#viewModalPublicKey").val(), "PLB004")
|
||||
})
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
let files = [];
|
||||
|
||||
$(document).on('click', '#addReferenceBtn', function (){
|
||||
getEditModal(null, "PLB003")
|
||||
})
|
||||
|
||||
$(document).on('click', '.planTr', function (){
|
||||
$(".trChkBox").prop("checked", false);
|
||||
$(this).find(".trChkBox").prop("checked", true);
|
||||
getViewModal(Number($(this).find(".planKey").val()), "PLB003");
|
||||
})
|
||||
|
||||
$(document).on('click', '#saveBtn', function (){
|
||||
savePublicBoard("referenceEditForm", "PLB003")
|
||||
})
|
||||
|
||||
$(document).on('click', '#editBtn', function (){
|
||||
$("#viewModal").modal('hide')
|
||||
getEditModal($("#viewModalPublicKey").val(), "PLB003")
|
||||
})
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="boardEditModalLabel" th:text="${info.publicKey eq null?'게시글 작성':'게시글 수정'}"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="boardEditBody">
|
||||
<form action="#" method="post" id="boardEditForm">
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="publicType" th:value="${info.publicType}">
|
||||
<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}">
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<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">
|
||||
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-3 col-form-label text-left">소속관서에만 노출</label>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="title" name="title" th:value="${info.title}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row justify-content-center">
|
||||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type='text' id="content" name='content' th:utext="${info.content}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="fileInputer" class="col-sm-2 col-form-label text-center">업로드 자료</label>
|
||||
<div class="col-sm-10" style="min-height: 70px;">
|
||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||
<th:block th:if="${#arrays.isEmpty(info.fileList)}">
|
||||
<br>파일을 업로드 해주세요.
|
||||
</th:block>
|
||||
<th:block th:unless="${#arrays.isEmpty(info.fileList)}">
|
||||
<div class='row-col-6' th:each="infoFile:${info.fileList}">
|
||||
<span th:data-fileseq="${infoFile.fileSeq}" th:text="|${infoFile.origNm}.${infoFile.fileExtn} ${infoFile.fileSize}|"></span>
|
||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout/layout}">
|
||||
<th:block layout:fragment="script">
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/publicBoard.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/board.js}"></script>
|
||||
</th:block>
|
||||
<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">
|
||||
<form method="get" th:action="@{/publicBoard/boardPage}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<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>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" 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>
|
||||
</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="board:${boardList}">
|
||||
<input type="hidden" class="planKey" th:value="${board.publicKey}">
|
||||
<td><input type="checkbox" class="trChkBox"></td>
|
||||
<td th:text="${board.title}"></td>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<td th:if="${board.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<td th:if="${board.wrtPart 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>
|
||||
<td th:text="${board.commentCnt eq null?'0':board.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="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="addBoardBtn">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="editContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="viewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="viewContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="publicViewModalLabel">게시글 열람</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<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">
|
||||
<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">
|
||||
<input type="text" class="form-control border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" th:checked="${info.organChk eq 'T'}" disabled>
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-2 col-form-label text-left">소속관서에만 노출</label>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control border-0" id="title" name="title" th:value="${info.title}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="mb-3 row">
|
||||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="content" th:utext="${info.content}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>파일명</th>
|
||||
<th>사이즈</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:if="${#lists.isEmpty(info.fileList)}">
|
||||
<tr>
|
||||
<td colspan="2">파일이 없습니다.</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(info.fileList)}">
|
||||
<th:block th:each="file:${info.fileList}">
|
||||
<tr class="fileInfoTr">
|
||||
<!-- <td><a href="#" class="fileDownLink" data-board="monthPlan" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>-->
|
||||
<td><a href="#" class="fileDownLink" data-board="publicFile"
|
||||
th:data-parentkey="${file.publicKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
|
||||
<td th:text="${file.fileSize}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="col-12" id="commentFormHome">
|
||||
<form action="#" method="post" id="commentForm">
|
||||
<div class="row">
|
||||
<div class="col-11">
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="parentComment" id="parentComment">
|
||||
<textarea id="comment" name="comment" placeholder="댓글작성"></textarea>
|
||||
</div>
|
||||
<div class="col-auto m-auto">
|
||||
<input type="button" class="btn btn-primary px-3 py-5" id="commentSaveBtn" value="작성">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-12 pt-3" id="commentDiv">
|
||||
<th:block th:each="comment:${info.commentList}">
|
||||
<div class="row justify-content-start commentRow">
|
||||
<input type="hidden" class="publicKey" th:value="${comment.publicKey}">
|
||||
<input type="hidden" class="commentKey" th:value="${comment.commentKey}">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<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>
|
||||
<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">
|
||||
<button type="button" class="btn btn-sm btn-success childCommentBtn">댓글달기</button>
|
||||
</div>
|
||||
<div class="col-auto" th:if="${userSeq eq comment.wrtUserSeq}">
|
||||
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
||||
</div>
|
||||
<div class="col-12" th:utext="${comment.comment}"></div>
|
||||
<div class="col-12 childCommentDiv" style="display: none"></div>
|
||||
<hr>
|
||||
</div>
|
||||
<th:block th:each="childComment:${comment.childCommentList}">
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-auto">
|
||||
<i class="bi bi-arrow-return-right" ></i>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row justify-content-start commentRow">
|
||||
<input type="hidden" class="publicKey" th:value="${childComment.publicKey}">
|
||||
<input type="hidden" class="commentKey" th:value="${childComment.commentKey}">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<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>
|
||||
<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}">
|
||||
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
||||
</div>
|
||||
<div class="col-12" th:utext="${childComment.comment}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||
</th:block>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="qnaEditModalLabel" th:text="${info.publicKey eq null?'질문/답변 작성':'질문/답변 수정'}"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="qnaEditBody">
|
||||
<form action="#" method="post" id="qnaEditForm">
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="publicType" th:value="${info.publicType}">
|
||||
<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}">
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<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">
|
||||
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-3 col-form-label text-left">소속관서에만 노출</label>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="title" name="title" th:value="${info.title}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row justify-content-center">
|
||||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type='text' id="content" name='content' th:utext="${info.content}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="fileInputer" class="col-sm-2 col-form-label text-center">업로드 자료</label>
|
||||
<div class="col-sm-10" style="min-height: 70px;">
|
||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||
<th:block th:if="${#arrays.isEmpty(info.fileList)}">
|
||||
<br>파일을 업로드 해주세요.
|
||||
</th:block>
|
||||
<th:block th:unless="${#arrays.isEmpty(info.fileList)}">
|
||||
<div class='row-col-6' th:each="infoFile:${info.fileList}">
|
||||
<span th:data-fileseq="${infoFile.fileSeq}" th:text="|${infoFile.origNm}.${infoFile.fileExtn} ${infoFile.fileSize}|"></span>
|
||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="publicViewModalLabel">게시글 열람</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<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">
|
||||
<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">
|
||||
<input type="text" class="form-control border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" th:checked="${info.organChk eq 'T'}" disabled>
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-2 col-form-label text-left">소속관서에만 노출</label>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control border-0" id="title" name="title" th:value="${info.title}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="mb-3 row">
|
||||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="content" th:utext="${info.content}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>파일명</th>
|
||||
<th>사이즈</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:if="${#lists.isEmpty(info.fileList)}">
|
||||
<tr>
|
||||
<td colspan="2">파일이 없습니다.</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(info.fileList)}">
|
||||
<th:block th:each="file:${info.fileList}">
|
||||
<tr class="fileInfoTr">
|
||||
<!-- <td><a href="#" class="fileDownLink" data-board="monthPlan" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>-->
|
||||
<td><a href="#" class="fileDownLink" data-board="publicFile"
|
||||
th:data-parentkey="${file.publicKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
|
||||
<td th:text="${file.fileSize}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="col-12" id="commentFormHome">
|
||||
<form action="#" method="post" id="commentForm">
|
||||
<div class="row">
|
||||
<div class="col-11">
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="parentComment" id="parentComment">
|
||||
<textarea id="comment" name="comment" placeholder="댓글작성"></textarea>
|
||||
</div>
|
||||
<div class="col-auto m-auto">
|
||||
<input type="button" class="btn btn-primary px-3 py-5" id="commentSaveBtn" value="작성">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-12 pt-3" id="commentDiv">
|
||||
<th:block th:each="comment:${info.commentList}">
|
||||
<div class="row justify-content-start commentRow">
|
||||
<input type="hidden" class="publicKey" th:value="${comment.publicKey}">
|
||||
<input type="hidden" class="commentKey" th:value="${comment.commentKey}">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<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>
|
||||
<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">
|
||||
<button type="button" class="btn btn-sm btn-success childCommentBtn">댓글달기</button>
|
||||
</div>
|
||||
<div class="col-auto" th:if="${userSeq eq comment.wrtUserSeq}">
|
||||
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
||||
</div>
|
||||
<div class="col-12" th:utext="${comment.comment}"></div>
|
||||
<div class="col-12 childCommentDiv" style="display: none"></div>
|
||||
<hr>
|
||||
</div>
|
||||
<th:block th:each="childComment:${comment.childCommentList}">
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-auto">
|
||||
<i class="bi bi-arrow-return-right" ></i>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row justify-content-start commentRow">
|
||||
<input type="hidden" class="publicKey" th:value="${childComment.publicKey}">
|
||||
<input type="hidden" class="commentKey" th:value="${childComment.commentKey}">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<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>
|
||||
<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}">
|
||||
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
||||
</div>
|
||||
<div class="col-12" th:utext="${childComment.comment}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||
</th:block>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="referenceEditModalLabel" th:text="${info.publicKey eq null?'자료실 작성':'자료실 수정'}"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="referenceEditBody">
|
||||
<form action="#" method="post" id="referenceEditForm">
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="publicType" th:value="${info.publicType}">
|
||||
<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}">
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
<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">
|
||||
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-3 col-form-label text-left">소속관서에만 노출</label>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="title" name="title" th:value="${info.title}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row justify-content-center">
|
||||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type='text' id="content" name='content' th:utext="${info.content}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="fileInputer" class="col-sm-2 col-form-label text-center">업로드 자료</label>
|
||||
<div class="col-sm-10" style="min-height: 70px;">
|
||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||
<th:block th:if="${#arrays.isEmpty(info.fileList)}">
|
||||
<br>파일을 업로드 해주세요.
|
||||
</th:block>
|
||||
<th:block th:unless="${#arrays.isEmpty(info.fileList)}">
|
||||
<div class='row-col-6' th:each="infoFile:${info.fileList}">
|
||||
<span th:data-fileseq="${infoFile.fileSeq}" th:text="|${infoFile.origNm}.${infoFile.fileExtn} ${infoFile.fileSize}|"></span>
|
||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" class="d-none" id="fileInputer" multiple>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout/layout}">
|
||||
<th:block layout:fragment="script">
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/publicBoard.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/reference.js}"></script>
|
||||
</th:block>
|
||||
<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">
|
||||
<form method="get" th:action="@{/publicBoard/referencePage}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<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>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" 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>
|
||||
</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="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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="editContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="viewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="viewContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="publicViewModalLabel">게시글 열람</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<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">
|
||||
<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">
|
||||
<input type="text" class="form-control border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" th:checked="${info.organChk eq 'T'}" disabled>
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-2 col-form-label text-left">소속관서에만 노출</label>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control border-0" id="title" name="title" th:value="${info.title}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="mb-3 row">
|
||||
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="content" th:utext="${info.content}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>파일명</th>
|
||||
<th>사이즈</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:if="${#lists.isEmpty(info.fileList)}">
|
||||
<tr>
|
||||
<td colspan="2">파일이 없습니다.</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(info.fileList)}">
|
||||
<th:block th:each="file:${info.fileList}">
|
||||
<tr class="fileInfoTr">
|
||||
<!-- <td><a href="#" class="fileDownLink" data-board="monthPlan" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>-->
|
||||
<td><a href="#" class="fileDownLink" data-board="publicFile"
|
||||
th:data-parentkey="${file.publicKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
|
||||
<td th:text="${file.fileSize}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="col-12" id="commentFormHome">
|
||||
<form action="#" method="post" id="commentForm">
|
||||
<div class="row">
|
||||
<div class="col-11">
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="parentComment" id="parentComment">
|
||||
<textarea id="comment" name="comment" placeholder="댓글작성"></textarea>
|
||||
</div>
|
||||
<div class="col-auto m-auto">
|
||||
<input type="button" class="btn btn-primary px-3 py-5" id="commentSaveBtn" value="작성">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-12 pt-3" id="commentDiv">
|
||||
<th:block th:each="comment:${info.commentList}">
|
||||
<div class="row justify-content-start commentRow">
|
||||
<input type="hidden" class="publicKey" th:value="${comment.publicKey}">
|
||||
<input type="hidden" class="commentKey" th:value="${comment.commentKey}">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<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>
|
||||
<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">
|
||||
<button type="button" class="btn btn-sm btn-success childCommentBtn">댓글달기</button>
|
||||
</div>
|
||||
<div class="col-auto" th:if="${userSeq eq comment.wrtUserSeq}">
|
||||
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
||||
</div>
|
||||
<div class="col-12" th:utext="${comment.comment}"></div>
|
||||
<div class="col-12 childCommentDiv" style="display: none"></div>
|
||||
<hr>
|
||||
</div>
|
||||
<th:block th:each="childComment:${comment.childCommentList}">
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-auto">
|
||||
<i class="bi bi-arrow-return-right" ></i>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row justify-content-start commentRow">
|
||||
<input type="hidden" class="publicKey" th:value="${childComment.publicKey}">
|
||||
<input type="hidden" class="commentKey" th:value="${childComment.commentKey}">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
||||
</th:block>
|
||||
<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>
|
||||
<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}">
|
||||
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
||||
</div>
|
||||
<div class="col-12" th:utext="${childComment.comment}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||
</th:block>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
Loading…
Reference in New Issue