공용게시판 게시물 삭제 기능 추가.
parent
f41bb94ead
commit
df115a3b87
|
|
@ -71,7 +71,6 @@ public class PublicBoardController {
|
||||||
mav.addObject("referenceList", publicBoardService.selectContentList(publicBoard));
|
mav.addObject("referenceList", publicBoardService.selectContentList(publicBoard));
|
||||||
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||||
publicBoard.setPaginationInfo();
|
publicBoard.setPaginationInfo();
|
||||||
mav.addObject("tabStatusList", codeMgtService.selectCodeMgtList("RPC"));
|
|
||||||
mav.addObject("searchParams", publicBoard);
|
mav.addObject("searchParams", publicBoard);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
@ -142,6 +141,7 @@ public class PublicBoardController {
|
||||||
}
|
}
|
||||||
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("info", publicBoard);
|
mav.addObject("info", publicBoard);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
@ -173,4 +173,10 @@ public class PublicBoardController {
|
||||||
public void deleteComment (@RequestBody PublicComment comment){
|
public void deleteComment (@RequestBody PublicComment comment){
|
||||||
publicBoardService.deleteComment(comment.getPublicKey(), comment.getCommentKey());
|
publicBoardService.deleteComment(comment.getPublicKey(), comment.getCommentKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deletePublicBoard")
|
||||||
|
@ResponseBody
|
||||||
|
public void deletePublicBoard (@RequestBody PublicBoard board){
|
||||||
|
publicBoardService.deletePublicBoard(board.getPublicKey());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,10 @@ public class PublicBoard extends BaseModel {
|
||||||
private LocalDateTime wrtDt;
|
private LocalDateTime wrtDt;
|
||||||
@Column(name = "organ_chk")
|
@Column(name = "organ_chk")
|
||||||
private String organChk;
|
private String organChk;
|
||||||
@Column(name = "tab_status")
|
@Column(name = "selected_tab")
|
||||||
private String tabStatus;
|
private String selectedTab;
|
||||||
|
@Column(name = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private Integer fileCnt;
|
private Integer fileCnt;
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,13 @@ package com.dbnt.faisp.main.publicBoard.repository;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.publicBoard.model.PublicBoard;
|
import com.dbnt.faisp.main.publicBoard.model.PublicBoard;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
|
|
||||||
public interface PublicBoardRepository extends JpaRepository<PublicBoard, Integer> {
|
public interface PublicBoardRepository extends JpaRepository<PublicBoard, Integer> {
|
||||||
|
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query("update PublicBoard set status = :status where publicKey = :publicKey")
|
||||||
|
void bulkModifyingByPublicKeyToStatus(Integer publicKey, String status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,11 @@ public class PublicBoardService extends BaseService {
|
||||||
publicCommentRepository.deleteById(new PublicComment.PublicCommentId(publicKey, commentKey));
|
publicCommentRepository.deleteById(new PublicComment.PublicCommentId(publicKey, commentKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void deletePublicBoard(Integer publicKey) {
|
||||||
|
publicBoardRepository.bulkModifyingByPublicKeyToStatus(publicKey, "DST008");
|
||||||
|
}
|
||||||
|
|
||||||
public FileInfo selectPublicFile(Integer publicKey, Integer fileSeq){
|
public FileInfo selectPublicFile(Integer publicKey, Integer fileSeq){
|
||||||
return publicFileRepository.findById(new PublicFile.PublicFileId(publicKey, fileSeq)).orElse(null);
|
return publicFileRepository.findById(new PublicFile.PublicFileId(publicKey, fileSeq)).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
<mapper namespace="com.dbnt.faisp.main.publicBoard.mapper.PublicBoardMapper">
|
<mapper namespace="com.dbnt.faisp.main.publicBoard.mapper.PublicBoardMapper">
|
||||||
<sql id="selectContentListWhere">
|
<sql id="selectContentListWhere">
|
||||||
<where>
|
<where>
|
||||||
|
status <> 'DST008'
|
||||||
<if test='publicType != null and publicType != ""'>
|
<if test='publicType != null and publicType != ""'>
|
||||||
and a.public_type = #{publicType}
|
and a.public_type = #{publicType}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -24,8 +25,8 @@
|
||||||
<if test='endDate != null and endDate != ""'>
|
<if test='endDate != null and endDate != ""'>
|
||||||
and a.wrt_dt <= #{endDate}::date+1
|
and a.wrt_dt <= #{endDate}::date+1
|
||||||
</if>
|
</if>
|
||||||
<if test='tabStatus != null and tabStatus != ""'>
|
<if test='selectedTab != null and selectedTab != ""'>
|
||||||
and a.tab_status = #{tabStatus}
|
and a.selected_tab = #{selectedTab}
|
||||||
</if>
|
</if>
|
||||||
<if test="downOrganCdList != null or upOrganCdList != null">
|
<if test="downOrganCdList != null or upOrganCdList != null">
|
||||||
and a.public_key in (
|
and a.public_key in (
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,29 @@ $(document).on('click', '.deleteCommentBtn', function (){
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#deleteBtn', function (){
|
||||||
|
if(confirm("삭제하시겠습니까?\n되돌릴 수 없습니다.")){
|
||||||
|
contentFade("in");
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : JSON.stringify({publicKey: $("#viewModalPublicKey").val()}),
|
||||||
|
url : "/publicBoard/deletePublicBoard",
|
||||||
|
contentType: 'application/json',
|
||||||
|
beforeSend: function (xhr){
|
||||||
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
|
},
|
||||||
|
success : function(result) {
|
||||||
|
alert("삭제되었습니다.");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("삭제를 실패하였습니다.")
|
||||||
|
contentFade("out");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
function getEditModal(publicKey, publicType){
|
function getEditModal(publicKey, publicType){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/publicBoard/editModal',
|
url: '/publicBoard/editModal',
|
||||||
|
|
@ -156,7 +179,7 @@ function contentCheck(formId){
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
if($("#publicType").val()==="PLB003"){
|
if($("#publicType").val()==="PLB003"){
|
||||||
if(!$("#tabStatus").val()){
|
if(!$("#selectedTab").val()){
|
||||||
alert("분류를 선택해주세요.")
|
alert("분류를 선택해주세요.")
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
$(document).on('click', '.referenceTab', function (){
|
$(document).on('click', '.referenceTab', function (){
|
||||||
location.href = "/publicBoard/referencePage?tabStatus="+$(this).attr('data-tabcd')
|
location.href = "/publicBoard/referencePage?selectedTab="+$(this).attr('data-tabcd')
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#addReferenceBtn', function (){
|
$(document).on('click', '#addReferenceBtn', function (){
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<a href="/publicBoard/boardPage" class="nav-link link-dark">게시판</a>
|
<a href="/publicBoard/boardPage" class="nav-link link-dark">게시판</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/publicBoard/referencePage?tabStatus=RPC001" class="nav-link link-dark">자료실</a>
|
<a href="/publicBoard/referencePage?selectedTab=RPC001" class="nav-link link-dark">자료실</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="/publicBoard/qnaPage" class="nav-link link-dark">Q&A</a>
|
<a href="/publicBoard/qnaPage" class="nav-link link-dark">Q&A</a>
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
<div class="dashtit">
|
<div class="dashtit">
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col-auto">자료실</div>
|
<div class="col-auto">자료실</div>
|
||||||
<div class="col-auto"><a href="/publicBoard/referencePage?tabStatus=RPC001" class="link-dark"><img src="img/dashboard/plus.png" alt="자료실 더보기 아이콘" /></a></div>
|
<div class="col-auto"><a href="/publicBoard/referencePage?selectedTab=RPC001" class="link-dark"><img src="img/dashboard/plus.png" alt="자료실 더보기 아이콘" /></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
|
<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>
|
||||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
|
|
@ -89,15 +89,21 @@
|
||||||
<td align="left" th:text="${notice.title}"></td>
|
<td align="left" th:text="${notice.title}"></td>
|
||||||
<td th:text="${notice.fileCnt eq null?'파일 없음':#strings.concat(notice.fileCnt,' 건')}"></td>
|
<td th:text="${notice.fileCnt eq null?'파일 없음':#strings.concat(notice.fileCnt,' 건')}"></td>
|
||||||
<td th:text="${notice.commentCnt eq null?'0':notice.commentCnt}"></td>
|
<td th:text="${notice.commentCnt eq null?'0':notice.commentCnt}"></td>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
<td>
|
||||||
<td th:if="${notice.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||||
|
<th:block th:if="${notice.wrtOrgan eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get(notice.wrtOrgan)}">
|
</td>
|
||||||
<td th:if="${notice.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
<td>
|
||||||
|
<th:block th:each="code:${session.commonCode.get(notice.wrtOrgan)}">
|
||||||
|
<th:block th:if="${notice.wrtPart eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
</td>
|
||||||
<td th:if="${notice.wrtUserGrd eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
<td>
|
||||||
|
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||||
|
<th:block th:if="${notice.wrtUserGrd eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</td>
|
||||||
<td th:text="${notice.wrtUserNm}"></td>
|
<td th:text="${notice.wrtUserNm}"></td>
|
||||||
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
|
<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>
|
||||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
|
<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>
|
||||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
|
|
@ -32,20 +32,11 @@
|
||||||
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
|
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
|
||||||
</div>
|
</div>
|
||||||
<label for="organChk" class="col-sm-2 col-form-label col-form-label-sm text-left">소속관서에만 노출</label>
|
<label for="organChk" class="col-sm-2 col-form-label col-form-label-sm text-left">소속관서에만 노출</label>
|
||||||
<!-- <div class="col-sm-2" >-->
|
|
||||||
<!-- <select class="form-select form-select-sm" name="tabStatusList" id="tabStatusList" style="font-size: 1rem">-->
|
|
||||||
<!-- <option value="">메뉴 선택-</option>-->
|
|
||||||
<!-- <th:block th:each="tab:${tab.get('RPC')}">-->
|
|
||||||
<!-- <option th:value="${tab.itemCd}" th:text="${tab.itemValue}"-->
|
|
||||||
<!-- th:selected=""></option>-->
|
|
||||||
<!-- </th:block>-->
|
|
||||||
<!-- </select>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<select class="form-select form-select-sm" name="tabStatus" id="tabStatus">
|
<select class="form-select form-select-sm" name="selectedTab" id="selectedTab">
|
||||||
<option value="">분류 선택</option>
|
<option value="">분류 선택</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('RPC')}">
|
<th:block th:each="code:${session.commonCode.get('RPC')}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}">
|
<option th:value="${code.itemCd}" th:text="${code.itemValue}">
|
||||||
</option>
|
</option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,16 @@
|
||||||
<div class="col-12 card bg-light text-center">
|
<div class="col-12 card bg-light text-center">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<ul class="nav nav-tabs" id="boardTab" role="tablist">
|
<ul class="nav nav-tabs" id="boardTab" role="tablist">
|
||||||
<th:block th:each="tab:${tabStatusList}">
|
<th:block th:each="code:${session.commonCode.get('RPC')}">
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link referenceTab" th:data-tabcd="${tab.itemCd}" th:classappend="${tab.itemCd eq searchParams.tabStatus?'active':''}" data-bs-toggle="tab" type="button" role="tab" th:text="${tab.itemValue}"></button>
|
<button class="nav-link referenceTab" th:data-tabcd="${code.itemCd}" th:classappend="${code.itemCd eq searchParams.selectedTab?'active':''}" data-bs-toggle="tab" type="button" role="tab" th:text="${code.itemValue}"></button>
|
||||||
</li>
|
</li>
|
||||||
</th:block>
|
</th:block>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content bg-white border border-top-0 p-3" id="userContent">
|
<div class="tab-content bg-white border border-top-0 p-3" id="userContent">
|
||||||
<form method="get" th:action="@{/publicBoard/referencePage}">
|
<form method="get" th:action="@{/publicBoard/referencePage}">
|
||||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
<input type="hidden" name="tabStatus" th:value="${searchParams.tabStatus}">
|
<input type="hidden" name="selectedTab" th:value="${searchParams.selectedTab}">
|
||||||
<div class="row justify-content-between py-1">
|
<div class="row justify-content-between py-1">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">분류</label>
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">분류</label>
|
||||||
<label class="col-sm-1 col-form-label col-form-label-sm text-start">
|
<label class="col-sm-1 col-form-label col-form-label-sm text-start">
|
||||||
<th:block th:each="code:${session.commonCode.get('RPC')}">
|
<th:block th:each="code:${session.commonCode.get('RPC')}">
|
||||||
<th:block th:if="${code.itemCd eq info.tabStatus}" th:text="${code.itemValue}"></th:block>
|
<th:block th:if="${code.itemCd eq info.selectedTab}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-0"></div>
|
<div class="col-sm-0"></div>
|
||||||
|
|
@ -30,11 +30,11 @@
|
||||||
<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-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">작성자</label>
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
|
<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:each="code:${session.commonCode.get('OG')}">
|
||||||
<th:block th:if="${commonCode.itemCd eq info.wrtOrgan}" th:text="${commonCode.itemValue}"></th:block>
|
<th:block th:if="${code.itemCd eq info.wrtOrgan}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}" th:text="${commonCode.itemValue}"></th:block>
|
<th:block th:if="${code.itemCd eq info.wrtUserGrd}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:text="${info.wrtUserNm}"></th:block>
|
<th:block th:text="${info.wrtUserNm}"></th:block>
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -118,8 +118,8 @@
|
||||||
<!--<th:block th:each="commonCode:${session.commonCode.get(comment.wrtOrgan)}">
|
<!--<th:block th:each="commonCode:${session.commonCode.get(comment.wrtOrgan)}">
|
||||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||||
</th:block>-->
|
</th:block>-->
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||||
<div class="col-auto" th:if="${commonCode.itemCd eq comment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
<div class="col-auto" th:if="${code.itemCd eq comment.wrtUserGrd}" th:text="${code.itemValue}"></div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<div class="col-auto" th:text="${comment.wrtUserNm}"></div>
|
<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:text="${#temporals.format(comment.wrtDt, 'yyyy-MM-dd HH:mm')}"></div>
|
||||||
|
|
@ -145,14 +145,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtOrgan}" th:text="${commonCode.itemValue}"></div>
|
<div class="col-auto" th:if="${code.itemCd eq childComment.wrtOrgan}" th:text="${code.itemValue}"></div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<!--<th:block th:each="commonCode:${session.commonCode.get(childComment.wrtOrgan)}">
|
<!--<th:block th:each="commonCode:${session.commonCode.get(childComment.wrtOrgan)}">
|
||||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtPart}" th:text="${commonCode.itemValue}"></div>
|
||||||
</th:block>-->
|
</th:block>-->
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||||
<div class="col-auto" th:if="${commonCode.itemCd eq childComment.wrtUserGrd}" th:text="${commonCode.itemValue}"></div>
|
<div class="col-auto" th:if="${code.itemCd eq childComment.wrtUserGrd}" th:text="${code.itemValue}"></div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<div class="col-auto" th:text="${childComment.wrtUserNm}"></div>
|
<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:text="${#temporals.format(childComment.wrtDt, 'yyyy-MM-dd HH:mm')}"></div>
|
||||||
|
|
@ -168,6 +168,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
|
<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>
|
||||||
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
|
||||||
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
<button type="button" class="btn btn-warning" id="editBtn">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue