2021-11-24 09:27:36 +00:00
<!DOCTYPE html>
2021-11-25 06:00:10 +00:00
< html lang = "ko"
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
2021-12-03 09:07:14 +00:00
< th:block layout:fragment = "script" >
< script type = "text/javascript" th:src = "@{/js/admin/userMgt.js}" > < / script >
< / th:block >
< div layout:fragment = "content" >
2021-12-06 08:12:41 +00:00
< main class = "pt-3" >
2021-12-03 09:07:14 +00:00
< h4 > 사용자 관리< / h4 >
< div class = "row mx-0" >
< div class = "col-12 card text-center" >
< div class = "card-body" >
< div class = "row justify-content-start" >
< div class = "col-7" >
< form method = "get" th:action = "@{/admin/userMgt}" >
< input type = "hidden" name = "pageIndex" id = "pageIndex" th:value = "${searchParams.pageIndex}" >
< div class = "row justify-content-between" >
< div class = "col-auto row" >
< div class = "col-auto" >
< label for = "viewCnt" class = "col-form-label" > 데이터 수< / label >
< / div >
< div class = "col-auto" >
< select class = "form-select" name = "viewCnt" id = "viewCnt" >
< th:block th:each = "num : ${#numbers.sequence(1,5)}" >
< option th:value = "${num*10}" th:text = "${num*10}" th:selected = "${searchParams.viewCnt==num*10}" > < / option >
< / th:block >
< / select >
< / div >
< / div >
< div class = "col-auto" >
< div class = "row justify-content-end" >
< div class = "col-auto" >
< select class = "form-select" id = "searchConditionSelector" >
< option value = "userId" th:selected = "${searchParams.userId!=null and searchParams.userId!=''}" > 아이디< / option >
< option value = "name" th:selected = "${searchParams.name!=null and searchParams.name!=''}" > 이름< / option >
< option value = "positionName" th:selected = "${searchParams.positionName!=null and searchParams.positionName!=''}" > 부서< / option >
< option value = "departmentName" th:selected = "${searchParams.departmentName!=null and searchParams.departmentName!=''}" > 직급< / option >
< option value = "createDate" th:selected = "${searchParams.startDate!=null and searchParams.startDate!=''} or ${searchParams.endDate!=null and searchParams.endDate!=''}" > 생성일< / option >
< / select >
< / div >
< div class = "col-auto" id = "searchTextDiv" >
< input type = "text" class = "form-control" id = "textSearch" th:value = "${
(searchParams.userId!=null and searchParams.userId!='')?searchParams.userId:(
(searchParams.name!=null and searchParams.name!='')?searchParams.name:(
(searchParams.positionName!=null and searchParams.positionName!='')?searchParams.positionName:(
(searchParams.departmentName!=null and searchParams.departmentName!='')?searchParams.departmentName:''
)
)
)
}">
< / div >
< div class = "col-auto input-group w-auto input-daterange" id = "dateSelectorDiv" style = "display: none" >
< input type = "text" class = "form-control" id = "startDate" name = "startDate" placeholder = "시작일" autocomplete = "off" disabled th:value = "${searchParams.startDate}" >
< input type = "text" class = "form-control" id = "endDate" name = "endDate" placeholder = "종료일" autocomplete = "off" disabled th:value = "${searchParams.endDate}" >
< / div >
< div class = "col-auto" >
< input type = "submit" class = "btn btn-primary" id = "searchBtn" value = "검색" >
< / div >
< / div >
< / div >
< / div >
< / form >
< div class = "row-cols-6" >
< table class = "table table-striped" >
< thead >
< tr >
< th > < / th >
< th > 아이디< / th >
< th > 이름< / th >
< th > 부서< / th >
< th > 직급< / th >
< th > 생성일< / th >
2021-12-06 08:37:46 +00:00
< th > 상태< / th >
2021-12-03 09:07:14 +00:00
< / tr >
< / thead >
< tbody >
< tr class = "userInfoTr" th:each = "userInfo:${userInfoList}" >
< td >
< input type = "checkbox" class = "userInfoCheckBox" th:value = "${userInfo.userSeq}" >
< / td >
< td th:text = "${userInfo.userId}" > < / td >
2021-12-06 08:12:41 +00:00
< td th:text = "|${userInfo.name}${#strings.contains(userInfo.userRole,'ADMIN')?'(관리자)':''}|" > < / td >
2021-12-03 09:07:14 +00:00
< td th:text = "${userInfo.positionName}" > < / td >
< td th:text = "${userInfo.departmentName}" > < / td >
< td th:text = "${#temporals.format(userInfo.createDate, 'yyyy-MM-dd')}" > < / td >
2021-12-06 08:37:46 +00:00
< td th:text = "${#strings.contains(userInfo.userStatus,'T')?'활성화':'비활성화'}" > < / td >
2021-12-03 09:07:14 +00:00
< / tr >
< / tbody >
< / table >
< / div >
< div class = "row justify-content-between" >
< div class = "col-auto" > < / div >
< div class = "col-auto" >
< nav aria-label = "Page navigation" >
< ul class = "pagination" >
< 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)}" >
2021-12-06 08:12:41 +00:00
< li class = "page-item" th:data-pageindex = "${num}" th:classappend = "${searchParams.pageIndex==num?'active':''}" >
2021-12-03 09:07:14 +00:00
< 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 = "사용자 생성" data-bs-toggle = "modal" data-bs-target = "#userInfoModal" >
< / div >
< / div >
< / div >
< div class = "col-5" >
< ul class = "nav nav-tabs" id = "userTab" role = "tablist" >
< li class = "nav-item" role = "presentation" >
< button class = "nav-link active" id = "infoTab" data-bs-toggle = "tab" type = "button" role = "tab" > 개인정보< / button >
< / li >
< li class = "nav-item" role = "presentation" >
< button class = "nav-link" id = "categoryTab" data-bs-toggle = "tab" type = "button" role = "tab" > 권한< / button >
< / li >
< / ul >
2021-12-06 08:12:41 +00:00
< div class = "tab-content border border-top-0" id = "userContent" >
< div class = "py-5" >
< h3 > 왼쪽 목록에서 선택해주세요.< / h3 >
< / div >
2021-12-03 09:07:14 +00:00
< / div >
< / div >
< / div >
2021-11-29 09:38:48 +00:00
< / div >
< / div >
2021-12-03 09:07:14 +00:00
< / div >
< / main >
< div class = "modal fade" id = "userInfoModal" tabindex = "-1" aria-labelledby = "userInfoModalLabel" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header" >
< h5 class = "modal-title" id = "userInfoModalLabel" > 사용자 생성< / h5 >
< button type = "button" class = "btn-close" data-bs-dismiss = "modal" aria-label = "Close" > < / button >
< / div >
< div class = "modal-body" >
2021-12-06 08:12:41 +00:00
< form id = "userInfoInsert" action = "#" th:action = "@{/admin/insertUserInfo}" method = "post" >
2021-12-03 09:07:14 +00:00
< div class = "mb-3 row" >
< label for = "userId" class = "col-sm-4 col-form-label" > 아이디< / label >
< div class = "col-sm-6" >
< input type = "text" class = "form-control" id = "userId" name = "userId" autocomplete = "off" >
< / div >
2021-12-06 08:12:41 +00:00
< div class = "col-sm-auto form-text mx-auto" >
6~20자 사이의 알파벳, 숫자를 입력해주세요.
< / div >
2021-12-03 09:07:14 +00:00
< / div >
< div class = "mb-3 row" >
< label for = "password" class = "col-sm-4 col-form-label" > 비밀번호< / label >
< div class = "col-sm-6" >
< input type = "password" class = "form-control" id = "password" name = "password" >
< / div >
2021-12-06 08:12:41 +00:00
< div class = "col-sm-auto form-text mx-auto" >
8~16자 사이의 알파벳, 숫자 조합을 입력해주세요.
< / div >
2021-12-03 09:07:14 +00:00
< / div >
< div class = "mb-3 row" >
< label for = "passwordConfirm" class = "col-sm-4 col-form-label" > 비밀번호 확인< / label >
< div class = "col-sm-6" >
< input type = "password" class = "form-control" id = "passwordConfirm" >
< / div >
< / div >
< div class = "mb-3 row" >
< label for = "name" class = "col-sm-4 col-form-label" > 이름< / label >
< div class = "col-sm-6" >
< input type = "text" class = "form-control" id = "name" name = "name" autocomplete = "off" >
< / div >
< / div >
< div class = "mb-3 row" >
< label for = "department" class = "col-sm-4 col-form-label" > 부서< / label >
< div class = "col-sm-6" >
< select class = "form-select" id = "department" name = "department" >
2021-12-06 08:12:41 +00:00
< th:block th:each = "commonCode:${session.departmentList}" >
2021-12-03 09:07:14 +00:00
< option th:value = "${commonCode.codeSq}" th:text = "${commonCode.value}" > < / option >
< / th:block >
< / select >
< / div >
< / div >
< div class = "mb-3 row" >
< label for = "position" class = "col-sm-4 col-form-label" > 직급< / label >
< div class = "col-sm-6" >
< select class = "form-select" id = "position" name = "position" >
2021-12-06 08:12:41 +00:00
< th:block th:each = "commonCode:${session.positionList}" >
2021-12-03 09:07:14 +00:00
< option th:value = "${commonCode.codeSq}" th:text = "${commonCode.value}" > < / option >
< / th:block >
< / select >
< / div >
< / div >
2021-12-06 08:12:41 +00:00
< div class = "mb-3 row" >
< div class = "col-sm-4" > < / div >
< div class = "col-sm-auto form-check ms-3" >
< input type = "hidden" name = "userRole" value = "ROLE_MEMBER" >
< input class = "form-check-input" type = "checkbox" value = "ROLE_ADMIN" id = "roleAdmin" name = "userRole" >
< label class = "form-check-label" for = "roleAdmin" > 관리자 계정< / label >
< / div >
< / div >
2021-12-03 09:07:14 +00:00
< / form >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" id = "closeModalBtn" > 닫기< / button >
< button type = "button" class = "btn btn-primary" id = "saveBtn" > 저장< / button >
< / div >
< / div >
< / div >
2021-11-25 06:00:10 +00:00
< / div >
2021-12-03 09:07:14 +00:00
< / div >
2021-11-24 09:27:36 +00:00
< / html >