2021-12-15 07:07:35 +00:00
<!DOCTYPE html>
< 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}">
< th:block layout:fragment = "script" >
< script type = "text/javascript" th:src = "@{/js/board/contentList.js}" > < / script >
< / th:block >
< div layout:fragment = "content" >
< main class = "pt-3" >
< h4 th:text = "${pageTitle}" > < / 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 -->
2021-12-15 09:33:47 +00:00
< form method = "get" th:action = "@{/board/contentList}" >
2021-12-15 07:07:35 +00:00
< 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" >
2021-12-15 09:33:47 +00:00
< option > 검색조건< / option >
< / select >
<!-- <select class="form - select" id="searchConditionSelector">
2021-12-15 07:07:35 +00:00
< 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 >
2021-12-15 09:33:47 +00:00
< / select > -->
2021-12-15 07:07:35 +00:00
< / div >
< div class = "col-auto" id = "searchTextDiv" >
2021-12-15 09:33:47 +00:00
< input type = "text" class = "form-control" id = "textSearch" >
<!-- <input type="text" class="form - control" id="textSearch" th:value="${
2021-12-15 07:07:35 +00:00
(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:''
)
)
)
2021-12-15 09:33:47 +00:00
}">-->
2021-12-15 07:07:35 +00:00
< / 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 >
2021-12-15 09:33:47 +00:00
< / form >
2021-12-15 07:07:35 +00:00
< div class = "row-cols-6" >
< table class = "table table-striped" >
< thead >
< tr >
< th > < / th >
< th > 제목< / th >
< th > 파일 수< / th >
< th > 작성자< / th >
< th > 작성일< / th >
< / tr >
< / thead >
< tbody >
< tr class = "contentTr" th:each = "content:${contentList}" >
< td >
< input type = "checkbox" class = "contentCheckBox" th:value = "${content.contentSeq}" >
< / td >
< td th:text = "${content.title}" > < / td >
< td th:text = "${content.fileCnt}" > < / td >
< td th:text = "${content.createName}" > < / td >
< th:block th:if = "${#dates.format(#dates.createNow(), 'yyyy-MM-dd')} == ${#temporals.format(content.createDate, 'yyyy-MM-dd')}" >
< td th:text = "${#temporals.format(content.createDate, 'HH:mm:ss')}" > < / td >
< / th:block >
< th:block th:if = "${#dates.format(#dates.createNow(), 'yyyy-MM-dd')} != ${#temporals.format(content.createDate, 'yyyy-MM-dd')}" >
< td th:text = "${#temporals.format(content.createDate, 'yyyy-MM-dd')}" > < / td >
< / th:block >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "row justify-content-center" >
< 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)}" >
< 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" > » < / span >
< / a >
< / li >
< / th:block >
< / ul >
< / nav >
< / div >
< / div >
< / div >
< div class = "col-5" >
2021-12-15 09:33:47 +00:00
< ul class = "nav nav-tabs" id = "boardTab" role = "tablist" >
2021-12-15 07:07:35 +00:00
< li class = "nav-item" role = "presentation" >
2021-12-15 09:33:47 +00:00
< button class = "nav-link active" id = "contentTab" data-bs-toggle = "tab" type = "button" role = "tab" > 내용< / button >
2021-12-15 07:07:35 +00:00
< / li >
< li class = "nav-item" role = "presentation" >
2021-12-15 09:33:47 +00:00
< button class = "nav-link" id = "logTab" data-bs-toggle = "tab" type = "button" role = "tab" > 이력< / button >
2021-12-15 07:07:35 +00:00
< / li >
< / ul >
2021-12-15 09:33:47 +00:00
< div class = "tab-content border border-top-0" id = "boardDiv" >
2021-12-15 07:07:35 +00:00
< div class = "py-5" >
< h3 > 왼쪽 목록에서 선택해주세요.< / h3 >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / main >
< / div >
< / html >