<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>시나리오GUI</title>
    <%@ include file="/WEB-INF/jsp/adm/include/topLinkTag.jsp"%>
    <script src="<c:url value='/js/adm/rcp/conversation/scenarioGUI.js' />"></script>
    <script src="<c:url value='/js/adm/rcp/conversation/common.js' />"></script>
    <script src="<c:url value='/js/utils.js' />"></script>
</head>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>API NODE</h1>
<div class="skip_navigation">
    <ul>
        <li>
            <a href="#Content" class="go_content">본문 바로가기</a>
        </li>
        <li>
            <a href="#Gnb">메뉴 바로가기</a>
        </li>
    </ul>
</div>

<header id="header">
    <%@ include file="/WEB-INF/jsp/adm/include/header.jsp"%>
</header>
<c:import url="/adm/menu/getLnbMenu.do" />
<section id="Content" class="bot_common">
    <div class="location">
        <ul>
            <li class="home"><a href="#">HOME</a></li>
            <li><a href="#">대화관리</a></li>
            <li><a href="#">시나리오관리</a></li>
        </ul>
    </div>

    <div id="manageScenario" class="sub_cont" popupSeq="${scenarioSeq}">
        <div class="cont_box">
            <div class="box_title">
                <div class="fl">
                    <h2 class="mt12">시나리오 관리</h2>
                </div>
                <div class="fr">
                    <div class="btn_wrap fl">
                        <a id="btnSearchScenario" href="#" class="btn">조회</a>
                    </div>
                </div>
            </div>
            <div class="tbl">
                <table class="search block">
                    <colgroup>
                        <col width="140px">
                        <col width="auto">
                        <col width="140px">
                        <col width="auto">
                    </colgroup>
                    <tbody>
                    <tr>
                        <th class="tl">시나리오그룹</th>
                        <td class="tl">
                            <div class="sel_box">
                                <select id="serviceGroup" class="wide">
                                </select>
                            </div>
                        </td>
                        <th class="tl">시나리오명</th>
                        <td class="tl">
                            <input type="text" placeholder="시나리오명을 입력해주세요." id="scenarionName" class="">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="cont_box">
            <div class="box_title">
                <div class="fl">
                    <h2 class="mt12">시나리오 리스트</h2>
                </div>
                <div class="btn_wrap fr">
                    <a id="btnScenarioRegistration" href="#" rel="createScenario" class="btn line modalLoad">등록</a>
                </div>
            </div>
            <div class="tbl">
                <table id="scenarioListTable" class="click modalLoad" rel="managerScenario">
                    <colgroup>
                        <col width="auto">
                        <col width="250px">
                        <col width="200px">
                        <col width="200px">
                        <col width="140px">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>시퀀스</th>
                        <th>시나리오명</th>
                        <th>연관 인텐트</th>
                        <th>수정일</th>
                        <th>수정자</th>
                        <th>배포버전</th>
                    </tr>
                    </thead>
                    <tbody>
                    <!--
                                                <tr>
                                                    <td><a href="#" rel="reservationScenario" class="modalLoad"><b>{{string}}</b></a></td>
                                                    <td>{{YYYY-MM-DD HH:MM:SS}}</td>
                                                    <td>{{string}}</td>
                                                    <td>{{string}}</td>
                                                </tr>
                    -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</section>


<!--  modal :: 시나리오 관리  -->
<div class="modal" id="managerScenario" scSeq="-1" style="width:1024px">
    <div class="modal_header" id="managerScenarioHeader">
        <h3>시나리오 관리({시나리오 명})</h3>
    </div>
    <div class="modal_body">
        <div class="row">
            <div class="col">
                <div class="modal_cont">
                    <div class="box_title">
                        <div class="fl">
                            <h2 class="mt12">시나리오명</h2>
                        </div>
                        <div class="fr">
                            <div class="btn_wrap fl sm">
                                <a id="btnScenarioNameApply" href="#" class="btn">저장</a>
                            </div>
                        </div>
                    </div>
                    <dl>
                        <dd class="full">
                            <div id="ipbScenarioName" class="ipt_box">
                                <input  type="text" value="{scenario name}">
                            </div>
                        </dd>
                    </dl>

                </div>
                <div class="modal_cont">
                    <div class="box_title">
                        <div class="fl">
                            <h2 class="mt12">시나리오 현황</h2>
                        </div>
                        <div class="fr">
                            <div class="btn_wrap fl sm">
                                <a id="btnScenarioView" href="#" class="btn line">조회</a>
                                <a id="btnScenarioEdit" href="#" class="btn">편집</a>
                                <a id="btnScenarioRelease" href="#" class="btn">배포</a>
                            </div>
                        </div>
                    </div>
                    <div class="information-box">
                        <dl id="managerScenarioReleaseVersion">
                            <dt>
                                배포버전
                            </dt>
                            <dd>
                                ({version})
                            </dd>
                        </dl>
                        <dl id="managerScenarioModifyType">
                            <dt>
                                수정사항
                            </dt>
                            <dd>
                                    <span class="state sm normal">
                                        ({modifyType})
                                    </span>
                            </dd>
                        </dl>
                        <dl id="managerScenarioLastSave">
                            <dt>
                                마지막 저장
                            </dt>
                            <dd>
                                <em class="gray"> {save datetime} {update name}}</em>
                            </dd>
                        </dl>
                    </div>

                </div>

                <div class="modal_cont">
                    <div class="box_title">
                        <div class="fl">
                            <h2 class="mt12">버전 리스트</h2>
                        </div>
                    </div>
                    <div class="tbl">
                        <table id="scenarioReleaseTable" style="width: 100%">
                            <colgroup>
                                <col width="auto">
                                <col width="auto">
                                <col width="auto">
                                <col width="auto">
                                <col width="auto">
                            </colgroup>
                            <thead>
                            <tr>
                                <th>시퀀스</th>
                                <th>버전</th>
                                <th>배포</th>
                                <th>불러오기</th>
                                <th>배포일</th>
                                <th>배포자</th>
                            </tr>
                            </thead>
                            <tbody>
                            <!--
                            <tr>
                                <td>{{string}}</td>
                                <td>
                                    <div class="btn_wrap fl sm float-none">
                                        <a href="#" class="btn red">롤백</a>
                                    </div>
                                </td>
                                <td>
                                    <div class="btn_wrap fl sm float-none">
                                        <a href="#" class="btn line">불러오기</a>
                                    </div>
                                </td>
                                <td>{{YYYY-MM-DD HH:SS}}</td>
                                <td>{{string}}</td>
                            </tr>

                            <tr>
                                <td>{{string}}</td>
                                <td>
                                    배포중
                                </td>
                                <td>

                                </td>
                                <td>{{YYYY-MM-DD HH:SS}}</td>
                                <td>{{string}}</td>
                            </tr>
                            -->
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col" >
                <div class="modal_cont vh-flex">
                    <div class="box_title">
                        <div class="fl">
                            <h2 class="mt12">시나리오 히스토리</h2>
                        </div>
                    </div>
                    <div class="log-area">
                            <textarea name="" id="txScenarioHistory" cols="30" rows="10" readonly="readonly">
{scenario history}
                            </textarea>
                    </div>

                </div>
            </div>
        </div>

    </div>
    <div class="modal_footer">
        <div class="btn_wrap fr">
            <a href="#" class="btn close" onclick="fnScenarioSearchBtn()">취소</a>
            <a href="#" class="btn red" id="btnScenarioDelete">삭제</a>
        </div>
    </div>
    <div class="modal_controller">
        <a href="#" class="close" onclick="fnScenarioSearchBtn()">close</a>
    </div>
</div>
<!--  modal :: 시나리오등록  -->
<div class="modal" id="createScenario">
    <div class="modal_header">
        <h3>시나리오 등록</h3>
    </div>
    <div class="modal_body">
        <div class="modal_cont">
            <dl>
                <dt>
                    <h4>시나리오명 <em class="red">*</em></h4>
                </dt>
                <dd>
                    <div class="ipt_box" >
                        <input type="text" placeholder="시나리오명을 입력해주세요." id="insertScenarioName">
                    </div>
                </dd>
            </dl>
        </div>

    </div>
    <div class="modal_footer">
        <div class="btn_wrap fr">
            <a href="#" class="btn grey close" onclick="fnInitInsertScenario()">취소</a>
            <a href="#" class="btn" onclick="fnInsertScenario()">저장</a>
        </div>
    </div>
    <div class="modal_controller">
        <a href="#" class="close" onclick="fnInitInsertScenario()">close</a>
    </div>
</div>

<!--  modal :: 연관 인텐트 설정  -->
<div class="modal" id="relatedIntentModify" scSeq="-1">
    <div class="modal_header">
        <h3>연관 인텐트 설정</h3>
    </div>
    <div class="modal_body relatedIntent_body">
        <div class="modal_cont">
            <div class="box_title">
                <div class="fl">
                    <h2 class="mt12">인텐트 목록({scenario group})</h2>
                </div>
            </div>
            <div id="relatedIntent" class="option-grid type-scroll">
            <!-- 연관 인텐트 항목 추가 -->
            </div>
        </div>

    </div>
    <div class="modal_footer">
        <div class="btn_wrap fr">
            <a href="#" class="btn grey close" onclick="fnInitScenarioRelatedIntent()">취소</a>
            <a href="#" class="btn" id="btnSRelatedIntentSave" onclick="fnScenarioRelatedIntentSave()">저장</a>
        </div>
    </div>
    <div class="modal_controller">
        <a href="#" class="close" onclick="fnInitScenarioRelatedIntent()">close</a>
    </div>
</div>

</body>
</html>

