171 lines
9.2 KiB
HTML
171 lines
9.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
|
<div class="modal-header bg-blue">
|
|
<h5 class="modal-title text-white" id="publicViewModalLabel">공지사항 열람</h5>
|
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<input type="hidden" name="publicKeyKey" id="viewModalPublicKey" th:value="${info.publicKey}">
|
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
|
<li class="nav-item" role="presentation">
|
|
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
|
|
</li>
|
|
<li class="nav-item" role="presentation" th:if="${#lists.size(info.fileList)>0}">
|
|
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(info.fileList), ')')}"></button>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content bg-white border border-top-0 p-2">
|
|
<div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0">
|
|
<div class="row mb-1">
|
|
<div class="col-sm-0"></div>
|
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB">제목</label>
|
|
<label class="col-sm-5 col-form-label col-form-label-sm text-start" th:text="${info.title}"></label>
|
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB">작성일시</label>
|
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
|
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB">작성자</label>
|
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
|
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
|
<th:block th:if="${commonCode.itemCd eq info.wrtOrgan}" th:text="${commonCode.itemValue}"></th:block>
|
|
</th:block>
|
|
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
|
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}" th:text="${commonCode.itemValue}"></th:block>
|
|
</th:block>
|
|
<th:block th:text="${info.wrtUserNm}"></th:block>
|
|
</label>
|
|
<hr class="my-1">
|
|
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center bg-lightB">내용</label>
|
|
<div class="col-sm-11 form-control-sm">
|
|
<div id="content" th:utext="${info.content}"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<table class="table table-sm">
|
|
<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="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 class="my-1">
|
|
<div class="row justify-content-start">
|
|
<div class="col-12 mx-3" 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">
|
|
<input type="text" class=" form-control form-control-sm" id="comment" name="comment" placeholder="댓글작성">
|
|
</div>
|
|
<div class="col-1 d-grid gap-0">
|
|
<div class="input-group">
|
|
<input type="button" class="btn btn-sm btn-primary" id="commentSaveBtn" value="작성">
|
|
<input type="button" class="btn btn-sm btn-warning" id="childFormRemoveBtn" value="취소" style="display: none">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="col-12 form-control-sm pt-2" id="commentDiv">
|
|
<th:block th:each="comment:${info.commentList}">
|
|
<div class="row justify-content-between mx-3 commentRow">
|
|
<input type="hidden" class="publicKey" th:value="${comment.publicKey}">
|
|
<input type="hidden" class="commentKey" th:value="${comment.commentKey}">
|
|
<div class="col-auto">
|
|
<div class="row">
|
|
<div class="col-auto" th:utext="${comment.comment}"></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>
|
|
</div>
|
|
<div class="col-auto">
|
|
<div class="row">
|
|
<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>-->
|
|
<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>
|
|
</div>
|
|
<div class="col-12 childCommentFormDiv py-1" style="display: none"></div>
|
|
</div>
|
|
<div th:id="|childComment${comment.commentKey}|">
|
|
<th:block th:each="childComment:${comment.childCommentList}">
|
|
<div class="row justify-content-between commentRow my-1 mx-3">
|
|
<input type="hidden" class="publicKey" th:value="${childComment.publicKey}">
|
|
<input type="hidden" class="commentKey" th:value="${childComment.commentKey}">
|
|
<div class="col-auto">
|
|
<div class="row">
|
|
<div class="col-auto">
|
|
<i class="bi bi-arrow-return-right" ></i>
|
|
</div>
|
|
<div class="col-auto" th:utext="${childComment.comment}"></div>
|
|
<div class="col-auto" th:if="${userSeq eq childComment.wrtUserSeq}">
|
|
<button type="button" class="btn btn-sm btn-danger deleteCommentBtn">댓글삭제</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-auto">
|
|
<div class="row">
|
|
<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>-->
|
|
<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>
|
|
</div>
|
|
</div>
|
|
</th:block>
|
|
</div>
|
|
<hr class="my-1">
|
|
</th:block>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer bg-light">
|
|
<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> |