FAISP/src/main/resources/templates/sri/sriViewModal.html

151 lines
8.1 KiB
HTML

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="faRptViewModalLabel">SRI 열람</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="faSriViewBody">
<input type="hidden" id="faSriKey" th:value="${faSri.faSriKey}">
<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">
<button class="nav-link" id="readUserTab" data-bs-toggle="tab" data-bs-target="#readUserTabPanel" type="button" role="tab" aria-controls="readUserTabPanel" aria-selected="false">수신자</button>
</li>
<li class="nav-item" role="presentation" th:if="${#lists.size(faSri.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(faSri.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" th:if="${faSri.status eq 'DST001'}">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">상태</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq faSri.status}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
</div>
<div class="row mb-1">
<th:block th:if="${faSri.refKey eq null}">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">분류</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('SRI')}">
<th:block th:if="${code.itemCd eq faSri.faSriType}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">제출기한</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(faSri.faSriEdate, 'yyyy-MM-dd HH:mm')}"></label>
<div class="col-sm-4"></div>
</th:block>
<th:block th:if="${faSri.refKey ne null}">
<div class="col-sm-9"></div>
</th:block>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성일시</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(faSri.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
</div>
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">제목</label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="${faSri.title}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성자</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${faSri.wrtUserNm}"></label>
</div>
<hr class="my-1">
<div class="row mb-1 justify-content-center">
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">내용</label>
<div class="col-sm-11 form-control-sm" id="content" th:utext="${faSri.content}"></div>
</div>
<th:block th:if="${faSri.refKey ne null}">
<hr class="my-1">
<div class="row mb-1">
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">하달 SRI</label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start">
<th:block th:text="${faSri.refSri.title}"></th:block>
<i class="bi bi-arrow-right-square-fill text-info mouse-hover-clickable" id="getOriginSriBtn" th:data-fasrikey="${faSri.refKey}"></i>
</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성자</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${faSri.refSri.wrtUserNm}"></label>
</div>
</th:block>
</div>
<div class="tab-pane fade p-2" id="readUserTabPanel" role="tabpanel" tabindex="0">
<div class="row">
<div class="col-1">no</div>
<div class="col-9">수신자</div>
<div class="col-2">열람</div>
</div>
<hr class="my-1">
<div class="row">
<div class="col-12">
<th:block th:each="readUser, idx:${faSri.readUserList}">
<div class="row my-1">
<div class="col-1" th:text="${idx.index+1}"></div>
<div class="col-9">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd eq readUser.ogCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<th:block th:if="${commonCode.itemCd eq readUser.ofcCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<!--<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq readUser.titleCd}" th:text="|${commonCode.itemValue} ${readUser.userNm}|"></th:block>
</th:block>-->
<th:block th:text="${readUser.userNm}"></th:block>
</div>
<div class="col-2">
<th:block th:text="${readUser.readYn eq 'T'?'O':'X'}"></th:block>
</div>
</div>
</th:block>
</div>
</div>
</div>
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
<table class="table" id="fileTable">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(faSri.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(faSri.fileList)}">
<th:block th:each="file:${faSri.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="sri"
th:data-parentkey="${file.faSriKey}" 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>
<div class="modal-footer justify-content-between bg-light">
<div class="col-auto">
<th:block th:unless="${faSri.status eq 'DST008'}">
<button type="button" class="btn btn-danger" id="deleteSri" th:if="${userSeq eq faSri.wrtUserSeq} and ${accessAuth eq 'ACC003'}" th:data-fasrikey="${faSri.faSriKey}">삭제</button>
</th:block>
</div>
<div class="col-auto">
<th:block th:if="${userSeq eq faSri.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editFaSriBtn" th:if="${faSri.refSri eq null or faSri.refSri.faSriEdate >= #temporals.createNow()}" th:data-fasrikey="${faSri.faSriKey}">수정</button>
</th:block>
<th:block th:each="readUser:${faSri.readUserList}">
<th:block th:if="${userSeq eq readUser.userSeq}">
<th:block th:unless="${faSri.faSriEdate eq null}">
<button type="button" class="btn btn-success" id="reSendBtn" th:if="${faSri.faSriEdate >= #temporals.createNow()}" th:data-fasrikey="${faSri.faSriKey}">응신</button>
</th:block>
</th:block>
</th:block>
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
</div>
</div>