Merge branch 'bo_fixes' into 'dev'
[BO] 관리자 페이지 페이지네이션 수정 + 초기화, 검색버튼 오류 수정 See merge request korea-research/korea-research!100
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<form method="post" name="adminParamForm" onsubmit="goSearch();"
|
<form method="post" name="adminParamForm" onsubmit="goSearch();"
|
||||||
th:action="@{/settings/admins}"
|
th:action="@{/settings/admins}"
|
||||||
th:object="${listStatus}">
|
th:object="${listStatus}">
|
||||||
<div th:replace="admin/modal/modal-admin-excel:: modalFragment"></div>
|
|
||||||
<!-- hidden parameters -->
|
<!-- hidden parameters -->
|
||||||
<input name="page" th:value="${listOutput.pageable.pageNumber}" type="hidden"/>
|
<input name="page" th:value="${listOutput.pageable.pageNumber}" type="hidden"/>
|
||||||
<input name="sort" th:value="${listOutput.pageable.sort}" type="hidden"/>
|
<input name="sort" th:value="${listOutput.pageable.sort}" type="hidden"/>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<p class="label-txt">권한</p>
|
<p class="label-txt">권한</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" id="searchRole" th:field="*{searchRole}">
|
<select class="select-list" id="searchRole" name="searchRole" th:field="*{searchRole}">
|
||||||
<option selected value="">전체</option>
|
<option selected value="">전체</option>
|
||||||
<option th:each="role : ${roles}" th:text="${role.description}"
|
<option th:each="role : ${roles}" th:text="${role.description}"
|
||||||
th:value="${role.id}"></option>
|
th:value="${role.id}"></option>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" id="searchField" th:field="*{searchField}">
|
<select class="select-list" id="searchField" name="searchField" th:field="*{searchField}">
|
||||||
<option selected value="">전체</option>
|
<option selected value="">전체</option>
|
||||||
<option value="id">ID</option>
|
<option value="id">ID</option>
|
||||||
<option value="name">이름</option>
|
<option value="name">이름</option>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<p class="label-txt">실사</p>
|
<p class="label-txt">실사</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" id="searchArea" th:field="*{searchArea}">
|
<select class="select-list" id="searchArea" name="searchArea" th:field="*{searchArea}">
|
||||||
<option selected value="">전체</option>
|
<option selected value="">전체</option>
|
||||||
<option th:each="region : ${regionMainCode}" th:text="${region.codeText}"
|
<option th:each="region : ${regionMainCode}" th:text="${region.codeText}"
|
||||||
th:value="${region.id}"></option>
|
th:value="${region.id}"></option>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<p class="label-txt">계정사용여부</p>
|
<p class="label-txt">계정사용여부</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" id="searchDisabled" th:field="*{searchDisabled}">
|
<select class="select-list" id="searchDisabled" name="searchDisabled" th:field="*{searchDisabled}">
|
||||||
<option selected value="">전체</option>
|
<option selected value="">전체</option>
|
||||||
<option value="false">사용</option>
|
<option value="false">사용</option>
|
||||||
<option value="true">미사용</option>
|
<option value="true">미사용</option>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
type="checkbox"/></label>
|
type="checkbox"/></label>
|
||||||
</td>
|
</td>
|
||||||
<td class="underline"><a th:href="|javascript:goUpdate('${item.id}')|" th:text="${item.id}">아이디</a></td>
|
<td class="underline"><a th:href="|javascript:goUpdate('${item.id}')|" th:text="${item.id}">아이디</a></td>
|
||||||
<td th:text="${item.name}">이름</td>
|
<td th:text="${item.name != null && item.name != '' ? item.name : '-'}">이름</td>
|
||||||
<td>
|
<td>
|
||||||
<span th:each="role, status : ${item.roles}" th:text="${role.getDescription()} + ${!status.last ? ', ': ''}"></span>
|
<span th:each="role, status : ${item.roles}" th:text="${role.getDescription()} + ${!status.last ? ', ': ''}"></span>
|
||||||
</td>
|
</td>
|
||||||
@@ -131,12 +131,14 @@
|
|||||||
<button class="btn" onclick="showAdminExcelUploadModal();" type="button" th:unless="${activeProfile != 'local'}">
|
<button class="btn" onclick="showAdminExcelUploadModal();" type="button" th:unless="${activeProfile != 'local'}">
|
||||||
<span class="btn-txt">엑셀 업로드</span>
|
<span class="btn-txt">엑셀 업로드</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn" onclick="goExcel();" type="button"><span class="btn-txt" th:unless="${activeProfile != 'local'}">엑셀 다운로드</span></button>
|
<!-- <button class="btn" onclick="goExcel();" type="button"><span class="btn-txt" th:unless="${activeProfile != 'local'}">엑셀 다운로드</span></button>-->
|
||||||
<button class="btn" onclick="location.href='/settings/admins/create';" type="button"><span class="btn-txt">등록</span></button>
|
<button class="btn" onclick="location.href='/settings/admins/create';" type="button"><span class="btn-txt">등록</span></button>
|
||||||
<button class="btn" onclick="goRemove();" type="button"><span class="btn-txt">삭제</span></button>
|
<button class="btn" onclick="goRemove();" type="button"><span class="btn-txt">삭제</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div th:replace="admin/modal/modal-admin-excel:: modalFragment"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
@@ -161,6 +163,8 @@
|
|||||||
f.searchRole.value = '';
|
f.searchRole.value = '';
|
||||||
f.searchArea.value = '';
|
f.searchArea.value = '';
|
||||||
f.searchDisabled.value = '';
|
f.searchDisabled.value = '';
|
||||||
|
|
||||||
|
goSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function goUpdate(adminId) {
|
function goUpdate(adminId) {
|
||||||
@@ -202,20 +206,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function goExcel() {
|
// function goExcel() {
|
||||||
const f = document.adminParamForm;
|
// const f = document.adminParamForm;
|
||||||
f.action = '/settings/admins/excel';
|
// f.action = '/settings/admins/excel';
|
||||||
f.sort.value = convertToPageableSortValue(f.sort.value);
|
// f.sort.value = convertToPageableSortValue(f.sort.value);
|
||||||
f.method = 'post';
|
// f.method = 'post';
|
||||||
f.submit();
|
// f.submit();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
function showAdminExcelUploadModal() {
|
function showAdminExcelUploadModal() {
|
||||||
const modal = document.querySelector(".modal02");
|
const modal = document.querySelector(".modal02");
|
||||||
modal.ui.open();
|
modal.ui.open();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploadAdminExcel = () => {
|
const uploadAdminExcel = () => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@@ -256,7 +260,6 @@
|
|||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
document.querySelector(".modal02").ui.close();
|
document.querySelector(".modal02").ui.close();
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<section layout:fragment="script">
|
<!-- <section layout:fragment="script">-->
|
||||||
<script th:inline="javascript">
|
<!-- <script th:inline="javascript">-->
|
||||||
|
|
||||||
</script>
|
<!-- </script>-->
|
||||||
</section>
|
<!-- </section>-->
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
@@ -12,19 +12,43 @@
|
|||||||
<div th:fragment="pagination(items)">
|
<div th:fragment="pagination(items)">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<nav class="component-pagination" aria-label="페이지네이션">
|
<nav class="component-pagination" aria-label="페이지네이션">
|
||||||
<a class="pagination-item prev"
|
|
||||||
|
<!-- 첫 페이지 -->
|
||||||
|
<a class="page-link pagination-item first"
|
||||||
|
th:classappend="${items.pageable.pageNumber == 0} ? 'disabled'"
|
||||||
|
th:href="'javascript:goPageable(0, ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')'">
|
||||||
|
<span class="hide-txt">첫 페이지로 이동</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- 이전 페이지 -->
|
||||||
|
<a class="page-link pagination-item prev"
|
||||||
th:classappend="${!items.pageable.hasPrevious} ? 'disabled'"
|
th:classappend="${!items.pageable.hasPrevious} ? 'disabled'"
|
||||||
th:href="${items.pageable.hasPrevious} ? 'javascript:goPageable(' + ${items.pageable.pageNumber - 1} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"></a>
|
th:href="'javascript:goPageable(' + (${items.pageable.pageNumber - 1}) + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')'">
|
||||||
|
<span class="hide-txt">이전 페이지로 이동</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
<a class="pagination-item"
|
<!-- 페이지 목록 -->
|
||||||
th:classappend="${idx == items.pageable.pageNumber} ? 'disabled'"
|
<a class="page-link pagination-item"
|
||||||
th:each="idx : ${#numbers.sequence(0, items.totalPages == 0 ? 0 : items.totalPages - 1)}"
|
th:each="idx : ${#numbers.sequence(0, items.totalPages == 0 ? 0 : items.totalPages - 1)}"
|
||||||
|
th:classappend="${idx == items.pageable.pageNumber} ? 'disabled'"
|
||||||
th:href="${idx != items.pageable.pageNumber} ? 'javascript:goPageable(' + ${idx} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"
|
th:href="${idx != items.pageable.pageNumber} ? 'javascript:goPageable(' + ${idx} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"
|
||||||
th:text="${idx + 1}">페이지넘버</a>
|
th:aria-current="${idx == items.pageable.pageNumber} ? 'page'"
|
||||||
|
th:text="${idx + 1}">1</a>
|
||||||
|
|
||||||
<a class="pagination-item next"
|
<!-- 다음 페이지 -->
|
||||||
|
<a class="page-link pagination-item next"
|
||||||
th:classappend="${items.pageable.pageNumber >= items.totalPages - 1 or items.totalPages == 0} ? 'disabled'"
|
th:classappend="${items.pageable.pageNumber >= items.totalPages - 1 or items.totalPages == 0} ? 'disabled'"
|
||||||
th:href="${items.pageable.pageNumber < items.totalPages - 1 and items.totalPages > 0} ? 'javascript:goPageable(' + ${items.pageable.pageNumber + 1} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"></a>
|
th:href="${items.pageable.pageNumber < items.totalPages - 1} ? 'javascript:goPageable(' + (${items.pageable.pageNumber + 1}) + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'">
|
||||||
|
<span class="hide-txt">다음 페이지로 이동</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- 마지막 페이지 -->
|
||||||
|
<a class="page-link pagination-item last"
|
||||||
|
th:classappend="${items.pageable.pageNumber >= items.totalPages - 1 or items.totalPages == 0} ? 'disabled'"
|
||||||
|
th:href="${items.totalPages > 0 and items.pageable.pageNumber < items.totalPages - 1} ? 'javascript:goPageable(' + (${items.totalPages - 1}) + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'">
|
||||||
|
<span class="hide-txt">마지막 페이지로 이동</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user