<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{/web/layout/homeLayout}">
<th:block layout:fragment="layout_css">
    <link rel="stylesheet" href="/css/web/webCategorySelectList.css?v1.1">
    <link rel="stylesheet" href="/css/web/grid.css?v1.1">
</th:block>
<th:block layout:fragment="layout_top_script">
    <script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
    <script>
        let menuClass     = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";
		let categoryDivCd = "[[${param.categoryDivCd}]]"==""?"":"[[${param.categoryDivCd}]]";
		categoryDivCd = "[[${categoryDivCd}]]"==""?"":"[[${categoryDivCd}]]";
        
        let selectUseYn   = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
        let insertUseYn   = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
        let updateUseYn   = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
        let deleteUseYn   = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
        let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";

        /* 검색 관련 변수 */        
		let categoryNm = "[[${param.categoryName}]]"==""?"":"[[${param.categoryName}]]";
        
        let webCategorySort               = "[[${param.webCategorySort}]]";
        let webCategoryDir                = "[[${param.webCategoryDir}]]";
        let webCategoryStart              = "[[${param.webCategoryStart}]]"==""?0:"[[${param.webCategoryStart}]]";
        let webCategoryLimit              = "[[${param.webCategoryLimit}]]"==""?500:"[[${param.webCategoryLimit}]]";

        let webCategorySearchStartDate    = "[[${param.webCategorySearchStartDate}]]";
        let webCategorySearchEndDate      = "[[${param.webCategorySearchEndDate}]]";
        let webCategorySearchDateType     = "[[${param.webCategorySearchDateType}]]"==""?"A":"[[${param.webCategorySearchDateType}]]";
    </script>
</th:block>
<th:block layout:fragment="layout_content">
    <!-- 센터쪽 -->
    <div class="center_box">
        <p class="page_title">카테고리 관리</p>

        <div class="filter_box">
            <div class="form_box">                

                <!-- 이름input -->
                <div class="search_list">
                    <div class="search_box">
				        <select id="searchCategoryDivCd" required>
				            <option value="">전체</option>
				            <option value="01">다이어트 시술</option>
				            <option value="02">다이어트 이벤트</option>
				            <option value="03">쁘띠 시술</option>
				            <option value="04">쁘띠 이벤트</option>
				            <option value="05">다이어트 전후사진</option>
				            <option value="06">쁘띠 전후사진</option>
				        </select>
				    </div>
				    <div class="search_box">
				        <input type="text" id="searchCategoryNm" required placeholder="카테고리명">
				    </div>
                    <button id="btnSearchWebCategory" class="search_btn" data-toggle="modal" data-target=".work_closed_modal" style="transition: all 0.2s ease-in-out 0s;">조회</button>
                </div>
                
                <div class="right_btn_box">
		            <button id="btnInsertWebCategory" class="put_btn">
		                <img src="/image/web/notice_btn_icon.svg" alt="등록">등록
		            </button>
		            <button id="btnDeleteWebCategory" class="delete_btn">
		                <img src="/image/web/delete_btn_icon.svg" alt="삭제">삭제
		            </button>
		        </div>
            </div>
        </div>

        <div id="webCategoryGrid" class="table_box ag-theme-balham"></div>

        <!-- 페이지게이션 -->
        <div class="page_box">
            <nav aria-label="Page navigation" class="navigation">
                <ul class="pagination" id="webCategoryPagination"></ul>
            </nav>
        </div>
    </div>
    <form id="webCategorySelectListForm" method="POST" target="_blank"></form>
</th:block>
<th:block layout:fragment="layout_popup">
</th:block>
<th:block layout:fragment="layout_script">
    <script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
    <script src="/js/web/categoryManagement/CategoryManagement.js"></script>
</th:block>
</html>