175 lines
9.4 KiB
HTML
175 lines
9.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
layout:decorate="~{layout/layout}">
|
|
<th:block layout:fragment="script">
|
|
<script type="text/javascript" th:src="@{/js/menuMgt/menuMgt.js}"></script>
|
|
</th:block>
|
|
<div layout:fragment="content">
|
|
<main>
|
|
<div class="mb-2">
|
|
<div class="d-inline align-middle"><i class="bi bi-square-fill"></i></div>
|
|
<h5 class="d-inline align-middle"> 메뉴 관리</h5>
|
|
</div>
|
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
|
<div class="row mx-0">
|
|
<div class="col-12 card bg-light text-center">
|
|
<div class="card-body">
|
|
<form method="get" th:action="@{/menuMgt/menuMgtPage}">
|
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
|
<div class="row justify-content-between py-1">
|
|
<div class="col-auto">
|
|
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
|
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
|
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
|
</th:block>
|
|
</select>
|
|
</div>
|
|
<div class="col-auto">
|
|
<div class="row justify-content-end">
|
|
<div class="col-auto">
|
|
<select class="form-select form-select-sm" name="useChk">
|
|
<option value="">전체</option>
|
|
<option value="T">O</option>
|
|
<option value="F">X</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-auto">
|
|
<select class="form-select form-select-sm" name="cat1Cd">
|
|
<option value="">대분류 선택</option>
|
|
<th:block th:each="commonCode:${session.commonCode.get('CAT1')}">
|
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat1Cd eq commonCode.itemCd}"></option>
|
|
</th:block>
|
|
</select>
|
|
</div>
|
|
<div class="col-auto">
|
|
<select class="form-select form-select-sm" name="cat2Cd">
|
|
<option value="">중분류 선택</option>
|
|
<th:block th:each="commonCode:${session.commonCode.get('CAT2')}">
|
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat2Cd eq commonCode.itemCd}"></option>
|
|
</th:block>
|
|
</select>
|
|
</div>
|
|
<div class="col-auto">
|
|
<select class="form-select form-select-sm" name="cat3Cd">
|
|
<option value="">소분류 선택</option>
|
|
<th:block th:each="commonCode:${session.commonCode.get('CAT3')}">
|
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat3Cd eq commonCode.itemCd}"></option>
|
|
</th:block>
|
|
</select>
|
|
</div>
|
|
<div class="col-auto">
|
|
<input type="text" class="form-control form-control-sm" name="menuUrl" placeholder="url" th:value="${searchParams.menuUrl}">
|
|
</div>
|
|
<div class="col-auto">
|
|
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="row justify-content-start">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<table class="table table-sm table-hover table-bordered">
|
|
<thead>
|
|
<tr class="table-secondary">
|
|
<th><input type="checkbox" class="allChk"></th>
|
|
<!--<th>menuKey</th>-->
|
|
<th>대분류</th>
|
|
<th>중분류</th>
|
|
<th>소분류</th>
|
|
<th>정렬번호</th>
|
|
<th>url</th>
|
|
<th>사용여부</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="table-group-divider">
|
|
<tr class="menuTr" th:each="menuMgt:${menuMgtList}">
|
|
<input type="hidden" class="menuKey" th:value="${menuMgt.menuKey}">
|
|
<input type="hidden" class="cat1Cd" th:value="${menuMgt.cat1Cd}">
|
|
<input type="hidden" class="cat2Cd" th:value="${menuMgt.cat2Cd}">
|
|
<input type="hidden" class="cat3Cd" th:value="${menuMgt.cat3Cd}">
|
|
<input type="hidden" class="orderStr" th:value="${menuMgt.orderStr}">
|
|
<input type="hidden" class="menuUrl" th:value="${menuMgt.menuUrl}">
|
|
<input type="hidden" class="approvalChk" th:value="${menuMgt.approvalChk}">
|
|
<input type="hidden" class="useChk" th:value="${menuMgt.useChk}">
|
|
<td>
|
|
<input type="checkbox" class="menuCheckBox" th:value="${menuMgt.menuKey}">
|
|
</td>
|
|
<!--<td th:text="${menuMgt.menuKey}"></td>-->
|
|
<th:block th:if="${menuMgt.cat1RowspanCnt ne 0}" th:each="commonCode:${session.commonCode.get('CAT1')}">
|
|
<th:block th:if="${commonCode.itemCd eq menuMgt.cat1Cd}">
|
|
<td th:text="${commonCode.itemValue}" th:rowspan="${menuMgt.cat1RowspanCnt}"></td>
|
|
</th:block>
|
|
</th:block>
|
|
<th:block th:if="${menuMgt.cat2RowspanCnt ne 0}" th:each="commonCode:${session.commonCode.get('CAT2')}">
|
|
<th:block th:if="${commonCode.itemCd eq menuMgt.cat2Cd}">
|
|
<td th:text="${commonCode.itemValue}" th:rowspan="${menuMgt.cat2RowspanCnt}"></td>
|
|
</th:block>
|
|
</th:block>
|
|
<td>
|
|
<th:block th:each="commonCode:${session.commonCode.get('CAT3')}">
|
|
<th:block th:if="${commonCode.itemCd eq menuMgt.cat3Cd}" th:text="${commonCode.itemValue}"></th:block>
|
|
</th:block>
|
|
</td>
|
|
<td th:text="${menuMgt.orderStr}"></td>
|
|
<td th:text="${menuMgt.menuUrl}"></td>
|
|
<td th:text="${menuMgt.useChk eq 'T'?'O':''}"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="row justify-content-between">
|
|
<div class="col-auto">
|
|
<input type="button" class="btn btn-success" value="선택 삭제" id="deleteCheckedBtn">
|
|
</div>
|
|
<div class="col-auto">
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination mb-0">
|
|
<th:block th:if="${searchParams.pageIndex>3}">
|
|
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
|
<a class="page-link" href="#" aria-label="Previous">
|
|
<span aria-hidden="true">«</span>
|
|
</a>
|
|
</li>
|
|
</th:block>
|
|
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
|
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
|
<a class="page-link" href="#" th:text="${num}"></a>
|
|
</li>
|
|
</th:block>
|
|
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
|
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
|
<a class="page-link" href="#" aria-label="Next">
|
|
<span aria-hidden="true">»</span>
|
|
</a>
|
|
</li>
|
|
</th:block>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<div class="col-auto">
|
|
<input type="button" class="btn btn-success" value="메뉴 추가" id="addMenuBtn">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="modal fade" id="menuEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="menuEditModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" id="menuEditModalContent">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</html> |