130 lines
3.8 KiB
HTML
130 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
xmlns:th="http://www.thymeleaf.org">
|
|
|
|
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
|
<main id="content" role="main">
|
|
<div class="inner">
|
|
<section class="search-area">
|
|
<form autocomplete="off" method="get" name="reqForm" action="/info/notice"
|
|
onsubmit="formControl.goSearch()"
|
|
th:object="${reqVO}"
|
|
>
|
|
<input type="hidden" name="sort" id="sort" value="createdAt,DESC"/>
|
|
<input type="hidden" name="page" id="page" th:value="${notices != null} ? ${notices.number} : 0"/>
|
|
|
|
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용"
|
|
data-props-type="bottomSheet">
|
|
<input type="hidden" name="searchField"/>
|
|
<button type="button" class="select-box">
|
|
<span class="select-txt">제목 + 내용</span>
|
|
</button>
|
|
<div class="select-options">
|
|
<div class="select-header">
|
|
<p>검색 분류 선택</p>
|
|
<button type="button" class="select-close">
|
|
<span class="hide-txt">닫기</span>
|
|
</button>
|
|
</div>
|
|
<div class="select-scroll">
|
|
<ul class="">
|
|
<li class="option"
|
|
th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''"
|
|
data-value="titleContent">제목 + 내용
|
|
</li>
|
|
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''"
|
|
data-value="title">제목
|
|
</li>
|
|
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''"
|
|
data-value="content">내용
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="component-input">
|
|
<div class="input-field">
|
|
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue"
|
|
th:field="*{searchValue}"/>
|
|
<i class="input-field-ico ico-search" aria-hidden="true"
|
|
onclick="formControl.goSearch()"></i>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
<hr>
|
|
|
|
<section class="list-area" th:unless="${notices.content.size() > 0}">
|
|
<div class="no-data">
|
|
<i class="ico-nodata ico-large" aria-hidden="true"></i>
|
|
<p>조회 가능한 목록이 없습니다.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="list-area" th:if="${notices.content.size() > 0}">
|
|
<p class="total-num">
|
|
총 <strong th:text="${notices.totalElements}"></strong>건
|
|
</p>
|
|
<ul>
|
|
|
|
<li th:each="item : ${notices.content}">
|
|
<a th:href="@{'/info/notice/' + ${item.id}}">
|
|
<p class="list-tit" th:text="${item.title}"></p>
|
|
<p class="list-info">
|
|
<span class="date" th:text="${#temporals.format(item.createdAt, 'yyyy.MM.dd')}">2025.05.28</span>
|
|
<span class="badge" th:if="${item.newDate}">NEW</span>
|
|
</p>
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<div th:replace="common/list-components :: paginationCommon(${notices})"></div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<section layout:fragment="script">
|
|
<script th:inline="javascript">
|
|
let ENV = {
|
|
httpUrl: {
|
|
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
|
|
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
|
|
},
|
|
module: {
|
|
confirmPopup: null
|
|
},
|
|
submitted: false,
|
|
};
|
|
let formControl = {
|
|
init() {
|
|
|
|
},
|
|
|
|
/**
|
|
* TODO 검색할때 각 페이지에 함수 구현 필요.
|
|
* TODO 일단 뒤로가기에 대한 부분 정의가 없기에 페이지 이동으로 처리해둠...
|
|
*/
|
|
goSearch() {
|
|
const f = document.reqForm;
|
|
|
|
f.searchField.value = document.getElementById('searchFieldId').value;
|
|
f.submit();
|
|
},
|
|
goPageable(page, size, sort) {
|
|
const f = document.reqForm;
|
|
f.page.value = page;
|
|
f.submit();
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</section>
|
|
|
|
</html> |