/**
 * <pre>
 * @Class Name : insertReadItems.jsp
 * 
 * @Description : 방문열람신청 결과 화면 
 * 
 * 
 * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
 *
 * </pre>
 *
 * @ ------------    --------    ---------------------------
 * @ 수정일                     수정자             수정내용
 * @ ------------    --------    ---------------------------
 * @ 2021. 10. 25.   KNKIM       최초 생성
 *
 * 
 * @author 이씨플라자 * DIGITALSHIP KNKIM
 * @since 2021. 10. 25.
 * @version 1.0
 *
 */
 %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<script>

$( document ).ready(function() {
    
    if("${message}" != "") alert("${message}");
    
}); // document ready


function fn_searchHome() {
    location.href = "/search/searchList.do";
}

function fn_listReadItems() {
    location.href = "/read/listReadItems.do";
}


</script>
    
    

    
    <!-- 카트완료 섹션 -->
    <section class="location cart">
        <h2 class="blind">방문열람신청 섹션영역</h2>
        <div class="inner">
            <div class="row-top">
                <div class="location-box">
                    <ul class="loc">
                        <li>HOME</li>
                        <c:if test='${fromCart == "Y" }'>
                        <li>카트</li>
                        </c:if>
                        <li class="on">방문열람신청</li>
                    </ul>
                    <ul class="tit">
                        <li><span>방문열람</span>신청</li>
                    </ul>
                </div>
                <div class="arr"><img src="/images/icon/icon-join-arr2.png" alt="화살표 아이콘"></div>
            </div>
            <div class="contents row-bottom">
                <div class="cart-box">
                    <div class="tab">
                        <div class="tab_content loan-confirm visit-confirm">
                            <div class="tabs_item">
                                <div class="inner">
                                    <div class="list-cart-wrap confirm">
                                    
                                        <h3><label>방문열람신청완료 : ${readVO.mngOrgNm }</label></h3>
                                        
                                        <div class="list-cart">
                                            <div class="list t-tit-line">
                                                <div class="t-data t-mo">자료정보</div>
                                                <div class="t-state t-mo">이용상태</div>
                                                <div class="t-date t-mo">반납예정일</div>
                                                <div class="t-reser t-mo">신청/예약정보</div>
                                            </div>
                                                                            
                                          <c:set var="totCnt" value="0" />
                                            
                                            <c:forEach var="read" items="${list}" varStatus="status">
                                            <!-- 행 : 시작  -->
                                            <div class="list list-content">
                                                <div class="t-data">
                                                    <div class="img"><a href="javascript:void(0)"><img src="${read.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${read.masterId }')"></a>
                                                      <c:if test='${read.MUseYn == "Y"}'>
                                                          <span id="favorites_${read.masterId}" class="favorites" onclick="fn_changeInterest('${read.masterId }', 'off')" title="관심자료에서 삭제합니다.">
                                                          <img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
                                                          <img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
                                                          </span>
                                                      </c:if>
                                                      <c:if test='${read.MUseYn != "Y"}'>
                                                          <span class="favorites" onclick="fn_changeInterest('${read.masterId }', 'on')" title="관심자료로 등록합니다.">
                                                          <img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
                                                          <img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
                                                          </span>
                                                      </c:if>                                                      </div>
                                                    <div class="type">
                                                        <c:if test="${read.ableOnline }">
                                                        <span class="online">온라인열람</span>
                                                        </c:if>
                                                        
                                                        <c:if test="${read.ableRent }">
                                                        <span class="loan">대출</span>
                                                        </c:if>
                                                        
                                                        <c:if test="${read.ableRead }">
                                                        <span class="visit">방문열람</span>
                                                        </c:if>
                                                    </div>
                                                    <div class="title"><a href="javascript:void(0)" onclick="gfn_getDetail('${read.masterId }')" title="상세보기">${read.title }</a></div>
                                                </div>
                                                <div class="t-state"><p>${read.useStatusNm }</p></div>
                                                <div class="t-date">${read.rtnExpctDd }</div>
                                                <div class="t-reser poss">${read.bookLtRvStatusNm } 
                                                    <c:if test='${not empty read.rsrvDd }'>
                                                        (${read.rsrvDd })
                                                    </c:if>
                                                </div>
                                            </div>
                                            <!-- 행 : 종료  -->
                                            
                                                <c:set var="totCnt" value="${totCnt+1}" />
                                            </c:forEach>  
                                            
                                        
                                        </div>
                                    </div>

                                    <div class="compl-box">
                                        <div class="compl-icon"><img src="/images/icon/icon-cart-com.png" alt="체크 아이콘"></div>
                                        
                                        <c:if test='${readVO.resultCode == "S"}'>
                                        <div class="compl-text">자료 <span>${totCnt}</span>건 방문열람신청이 접수되었습니다.</div>
                                        <div class="compl-date">(희망방문일자: ${readVO.hopeReqPridDtmFrom} ~ ${readVO.hopeReqPridDtmTo})</div>
                                        </c:if>
                                        
                                        <c:if test='${readVO.resultCode != "S"}'>
                                        <div class="compl-text">처리에 실패하였습니다.</div>
                                        <div class="compl-date">${readVO.resultMessage }</div>
                                        </c:if>
                                    </div>
                                    
                                    <p class="text">- 방문열람신청 내역은 [마이페이지 &#62; 방문열람관리]에서 확인하실 수 있습니다.</p>
                                    <p class="text">- 방문열람시간은 관리자가 지정하며, 승인 후 지정된 일시에 방문하지 않는 경우, 미열람 처리됩니다.</p>
                                    
                                    <div class="btn-wrap">  
                                        <button type="button" class="btn btn-color" onclick="fn_searchHome()">소장자료 가기</button>
                                        <button type="button" class="btn btn-green" onclick="fn_listReadItems()">방문열람관리 가기</button>
                                    </div>                                    
                                    
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    

                      
