parent
f4b604e392
commit
57a6e547fa
|
|
@ -139,6 +139,7 @@ public class PublicBoardController {
|
||||||
mav = new ModelAndView("publicBoard/qna/qnaViewModal");
|
mav = new ModelAndView("publicBoard/qna/qnaViewModal");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
mav.addObject("modalType", publicBoard.getModalType());
|
||||||
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey());
|
||||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||||
mav.addObject("userRole", loginUser.getUserRole());
|
mav.addObject("userRole", loginUser.getUserRole());
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ $(document).on('click', '#addNoticeBtn', function (){
|
||||||
$(document).on('click', '.noticeTr', function (){
|
$(document).on('click', '.noticeTr', function (){
|
||||||
$(".trChkBox").prop("checked", false);
|
$(".trChkBox").prop("checked", false);
|
||||||
$(this).find(".trChkBox").prop("checked", true);
|
$(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 (){
|
$(document).on('click', '#saveBtn', function (){
|
||||||
|
|
|
||||||
|
|
@ -120,10 +120,10 @@ function getEditModal(publicKey, publicType){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getViewModal(publicKey, publicType){
|
function getViewModal(publicKey, publicType, modalType){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/publicBoard/viewModal',
|
url: '/publicBoard/viewModal',
|
||||||
data: {publicKey: publicKey, publicType: publicType},
|
data: {publicKey: publicKey, publicType: publicType, modalType: modalType},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ $(document).on('click', '#saveBtn', function (){
|
||||||
$(document).on('click', '.referenceTr', function (){
|
$(document).on('click', '.referenceTr', function (){
|
||||||
$(".trChkBox").prop("checked", false);
|
$(".trChkBox").prop("checked", false);
|
||||||
$(this).find(".trChkBox").prop("checked", true);
|
$(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 (){
|
$(document).on('click', '#editBtn', function (){
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${#lists.isEmpty(noticeList)}">
|
<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}">
|
<input type="hidden" class="publicKey" th:value="${notice.publicKey}">
|
||||||
<td>
|
<td>
|
||||||
<i class="bi bi-dot" style="color: #3d73d7"></i>
|
<i class="bi bi-dot" style="color: #3d73d7"></i>
|
||||||
|
|
@ -197,6 +198,7 @@
|
||||||
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd')}"></td>
|
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</th:block>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -230,7 +232,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${#lists.isEmpty(referenceList)}">
|
<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}">
|
<input type="hidden" class="publicKey" th:value="${reference.publicKey}">
|
||||||
<td>
|
<td>
|
||||||
<i class="bi bi-dot" style="color: #3d73d7"></i>
|
<i class="bi bi-dot" style="color: #3d73d7"></i>
|
||||||
|
|
@ -241,6 +244,7 @@
|
||||||
<td th:text="${#temporals.format(reference.wrtDt, 'yyyy-MM-dd')}"></td>
|
<td th:text="${#temporals.format(reference.wrtDt, 'yyyy-MM-dd')}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</th:block>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -253,10 +257,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card iconmenu style2">
|
<div class="card iconmenu style2">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#"><img src="img/dashboard/auction.svg" alt="" />법령정보</a></li>
|
<li><a href="https://www.law.go.kr/" target="_blank"><img src="img/dashboard/auction.svg" alt="" />법령정보</a></li>
|
||||||
<li><a href="#"><img src="img/dashboard/handshake.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="#"><img src="img/dashboard/방첩정보포털 아이콘.png" 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="#"><img src="img/dashboard/형사사법 정보시스템 아이콘.png" alt="" />형사사법<br />정보시스템</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 작성자일 경우 삭제 허용-->
|
<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>
|
<button type="button" class="btn btn-danger" id="deleteBtn">삭제</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 작성자일 경우 삭제 허용-->
|
<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>
|
<button type="button" class="btn btn-danger" id="deleteBtn">삭제</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue