parent
f4b604e392
commit
57a6e547fa
|
|
@ -139,6 +139,7 @@ public class PublicBoardController {
|
|||
mav = new ModelAndView("publicBoard/qna/qnaViewModal");
|
||||
break;
|
||||
}
|
||||
mav.addObject("modalType", publicBoard.getModalType());
|
||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||
mav.addObject("userRole", loginUser.getUserRole());
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $(document).on('click', '#addNoticeBtn', function (){
|
|||
$(document).on('click', '.noticeTr', function (){
|
||||
$(".trChkBox").prop("checked", false);
|
||||
$(this).find(".trChkBox").prop("checked", true);
|
||||
getViewModal(Number($(this).find(".publicKey").val()), "PLB001");
|
||||
getViewModal(Number($(this).find(".publicKey").val()), "PLB001", $(this).attr("data-modaltype"));
|
||||
})
|
||||
|
||||
$(document).on('click', '#saveBtn', function (){
|
||||
|
|
|
|||
|
|
@ -120,10 +120,10 @@ function getEditModal(publicKey, publicType){
|
|||
});
|
||||
}
|
||||
|
||||
function getViewModal(publicKey, publicType){
|
||||
function getViewModal(publicKey, publicType, modalType){
|
||||
$.ajax({
|
||||
url: '/publicBoard/viewModal',
|
||||
data: {publicKey: publicKey, publicType: publicType},
|
||||
data: {publicKey: publicKey, publicType: publicType, modalType: modalType},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $(document).on('click', '#saveBtn', function (){
|
|||
$(document).on('click', '.referenceTr', function (){
|
||||
$(".trChkBox").prop("checked", false);
|
||||
$(this).find(".trChkBox").prop("checked", true);
|
||||
getViewModal(Number($(this).find(".publicKey").val()), "PLB003");
|
||||
getViewModal(Number($(this).find(".publicKey").val()), "PLB003", $(this).attr('data-modaltype'));
|
||||
})
|
||||
|
||||
$(document).on('click', '#editBtn', function (){
|
||||
|
|
|
|||
|
|
@ -186,7 +186,8 @@
|
|||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(noticeList)}">
|
||||
<tr class="noticeTr" th:each="notice:${noticeList}">
|
||||
<th:block th:each="notice:${noticeList}">
|
||||
<tr class="noticeTr" data-modaltype="viewOnly">
|
||||
<input type="hidden" class="publicKey" th:value="${notice.publicKey}">
|
||||
<td>
|
||||
<i class="bi bi-dot" style="color: #3d73d7"></i>
|
||||
|
|
@ -196,6 +197,7 @@
|
|||
<td th:text="${notice.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -230,7 +232,8 @@
|
|||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(referenceList)}">
|
||||
<tr class="referenceTr" th:each="reference:${referenceList}">
|
||||
<th:block th:each="reference:${referenceList}">
|
||||
<tr class="referenceTr" data-modaltype="viewOnly">
|
||||
<input type="hidden" class="publicKey" th:value="${reference.publicKey}">
|
||||
<td>
|
||||
<i class="bi bi-dot" style="color: #3d73d7"></i>
|
||||
|
|
@ -240,6 +243,7 @@
|
|||
<td th:text="${reference.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(reference.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -253,10 +257,10 @@
|
|||
</div>
|
||||
<div class="card iconmenu style2">
|
||||
<ul>
|
||||
<li><a href="#"><img src="img/dashboard/auction.svg" alt="" />법령정보</a></li>
|
||||
<li><a href="#"><img src="img/dashboard/handshake.svg" alt="" />수사지원</a></li>
|
||||
<li><a href="#"><img src="img/dashboard/방첩정보포털 아이콘.png" alt="" />방첩 정보포털</a></li>
|
||||
<li><a href="#"><img src="img/dashboard/형사사법 정보시스템 아이콘.png" alt="" />형사사법<br />정보시스템</a></li>
|
||||
<li><a href="https://www.law.go.kr/" target="_blank"><img src="img/dashboard/auction.svg" alt="" />법령정보</a></li>
|
||||
<li><a href="https://cis.kcg.go.kr/" target="_blank"><img src="img/dashboard/handshake.svg" alt="" />수사지원</a></li>
|
||||
<li><a href="http://ciportal.go.kr/html/main/main.html" target="_blank"><img src="img/dashboard/방첩정보포털 아이콘.png" alt="" />방첩 정보포털</a></li>
|
||||
<li><a href="http://police.kics.go.kr/portal/usr/login.do" target="_blank"><img src="img/dashboard/형사사법 정보시스템 아이콘.png" alt="" />형사사법<br />정보시스템</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<div class="modal-footer bg-light" th:if="${modalType ne 'viewOnly'}">
|
||||
<th:block th:if="${#strings.contains(userRole, 'ROLE_ADMIN') or userSeq eq info.wrtUserSeq}"><!--최상위 관리자 or 작성자일 경우 삭제 허용-->
|
||||
<button type="button" class="btn btn-danger" id="deleteBtn">삭제</button>
|
||||
</th:block>
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<div class="modal-footer bg-light" th:if="${modalType ne 'viewOnly'}">
|
||||
<th:block th:if="${#strings.contains(userRole, 'ROLE_SUB_ADMIN') or userSeq eq info.wrtUserSeq}"><!--관리자 or 작성자일 경우 삭제 허용-->
|
||||
<button type="button" class="btn btn-danger" id="deleteBtn">삭제</button>
|
||||
</th:block>
|
||||
|
|
|
|||
Loading…
Reference in New Issue