FAISP/src/main/resources/templates/adminPage/userMgt/accessChange.html

149 lines
7.7 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/userMgt/accessChange.js}"></script>
</th:block>
<div layout:fragment="content">
<main>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<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>
<div class="card bg-light">
<div class="card-body">
<form method="get" th:action="@{/userMgt/accessChangePage}">
<input type="hidden" name="userStatus" id="userStatus" th:value="${searchParams.userStatus}">
<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==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="ogCd" id="ogCdSearch">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="ofcCd" id="ofcCdSearch">
<option value="">부서 선택</option>
<th:block th:each="parentCode:${session.commonCode.get('OG')}">
<th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"
class="ofcCdOption" th:classappend="${parentCode.itemCd}" th:style="${#strings.isEmpty(searchParams.ogCd)?'':(searchParams.ogCd eq parentCode.itemCd?'':'display: none')}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="titleCd">
<option value="">계급 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.titleCd==commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userNm" placeholder="사용자명" th:value="${searchParams.userNm}">
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userId" placeholder="사용자 아이디" th:value="${searchParams.userId}">
</div>
<div class="col-auto">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div>
</div>
</div>
</div>
</form>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
<table class="table table-sm table-hover table-bordered">
<thead>
<tr class="table-secondary">
<th>소속</th>
<th>부서</th>
<th>계급</th>
<th>성명</th>
<th>아이디</th>
<th>식별번호</th>
<th>등록일</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="userInfoTr" th:each="userInfo:${userInfoList}">
<input type="hidden" class="userSeq" th:value="${userInfo.userSeq}">
<input type="hidden" class="userId" th:value="${userInfo.userId}">
<input type="hidden" class="userNm" th:value="${userInfo.userNm}">
<td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd == userInfo.ogCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
</td>
<td>
<th:block th:each="commonCode:${session.commonCode.get(userInfo.ogCd)}">
<th:block th:if="${commonCode.itemCd == userInfo.ofcCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
</td>
<td>
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd == userInfo.titleCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
</td>
<td th:text="${userInfo.userNm}"></td>
<td th:text="${userInfo.userId}"></td>
<td th:text="${userInfo.dicCode}"></td>
<td th:text="${#temporals.format(userInfo.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row justify-content-center">
<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">&laquo;</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==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">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</html>