<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
  <h5 class="modal-title" id="processResultEditModalLabel">불법조업 외국어선 처리현황</h5>
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<!-- 탭 메뉴 -->
<ul class="nav nav-tabs" role="tablist">
  <li class="nav-item" role="presentation">
    <button class="nav-link processResultTab" id="processResult-tab" data-bs-toggle="tab"
            data-bs-target="#processResult" type="button" role="tab" aria-controls="processResult" data-processResult-type="processResult"
            aria-selected="true">상세</button>
  </li>
  <li class="nav-item" role="presentation">
    <button class="nav-link processResultTab active" id="history-tab" data-bs-toggle="tab"
            data-bs-target="#history" type="button" role="tab" data-history-type="history"
            aria-controls="history">수정이력</button>
  </li>
</ul>
<!-- 내용 -->
<div class="tab-content">
  <div class="tab-pane fade show active" id="history" role="tabpanel" aria-labelledby="history-tab">
    <div class="modal-body" id="processResultEditBody">
      <form action="#" method="post" id="processResultEditForm">
        <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
        <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
        <input type="hidden" name="prKey" th:value="${processResult.prKey}">
        <input type="hidden" name="cdsKey" th:value="${processResult.cdsKey}">
        <input type="hidden" name="fbKey" th:value="${processResult.fbKey}">
        <th:block th:if="${!#lists.isEmpty(processReulstVersionList)}">
          <div class="row justify-content-start">
            <div class="col-3">
              <table class="table table-striped table-bordered"  id="processReulstVersionTable">
                <thead>
                <tr>
                  <th></th>
                  <th>작성인</th>
                  <th>작성/수정일</th>
                </tr>
                </thead>
                <tbody class="table-group-divider">
                <th:block th:each="processReulstVersion:${processReulstVersionList}">
                  <tr class="version-tr">
                    <td>
                      <input type="radio" name="versionNo" th:value="${processReulstVersion.versionNo}">
                    </td>
                    <td th:text="${processReulstVersion.wrtUserNm}"></td>
                    <td th:text="${#temporals.format(processReulstVersion.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
                  </tr>
                </th:block>
                </tbody>
              </table>
            </div>
            <div class="col-9">
              <div id="historyDetailDiv">
                <div class="mb-3 row">
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">사건번호</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="caseNum" id="caseNum" readonly>
                  </div>
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">피의자(선박명)</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="boatNameKr" id="boatNameKr" readonly>
                  </div>
                </div>
                <div class="mb-3 row">
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">선고법원</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="sentencingCourt" id="sentencingCourt" readonly>
                  </div>
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">선고내용</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="sentencingDetail" id="sentencingDetail" readonly>
                  </div>
                </div>
                <div class="mb-3 row">
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">집행내용</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="executionDetail" id="executionDetail" readonly>
                  </div>
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">환부일</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="returnDt" id="returnDt" readonly>
                  </div>
                </div>
                <div class="mb-3 row">
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">위탁시작일</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="consignmentStartDt" id="consignmentStartDt" readonly>
                  </div>
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">위탁종료일</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="consignmentEndDt" id="consignmentEndDt" readonly>
                  </div>
                </div>
                <div class="mb-3 row">
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">몰수확정일</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="confiscationDt" id="confiscationDt" readonly>
                  </div>
                  <label class="col-sm-2 col-form-label col-form-label-sm text-center">폐선일</label>
                  <div class="col-4">
                    <input class="form-control form-control-sm" name="boatDisposalDt" id="boatDisposalDt" readonly>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </th:block>
        <th:block th:if="${#lists.isEmpty(processReulstVersionList)}">
          <div>수정이력이 없습니다.</div>
        </th:block>
      </form>
    </div>
  </div>
</div>
<div class="modal-footer">
  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>
</html>