popup-list.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th=http://www.thymeleaf.org>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta name="viewport" content="width=device-width,initial-scale=1"/>
  6. <meta name="theme-color" content="#000000"/>
  7. <meta name="description" content="포항시 교통정보센터입니다"/>
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  9. <title>포항시 교통정보센터</title>
  10. <th:block th:include="/include/head.html"></th:block>
  11. <link rel="stylesheet" th:href="@{/css/notice.css}">
  12. </head>
  13. <body id="body">
  14. <th:block th:include="/include/admin-header.html"></th:block>
  15. <div class="noticeWrap">
  16. <div class="container">
  17. <h2 class="admin-header">팝업공지</h2>
  18. <div class="admin-content">
  19. <div class="title">
  20. <a th:href="@{/phits/popup-write}">글쓰기</a>
  21. </div>
  22. <div class="list">
  23. <a th:each="item : ${list.getList()}" th:onclick="movePath([[ '/phits/popup-view/'+ ${item.getPopupid()}]])" style="display: flex;">
  24. <div th:text="${item.getTitle()}"></div>
  25. <div class="item-right">
  26. <div th:text="${item.getRegdate()}"></div>
  27. </div>
  28. </a>
  29. </div>
  30. <div class="pagination">
  31. <div class="previous">
  32. <img th:if="${list.getPrevPage() == 0}" src="/images/icon/previous.png" alt="이전">
  33. <img th:if="${list.getPrevPage() > 0}" class="active" src="/images/icon/previous_active.png" alt="이전">
  34. </div>
  35. <div class="pages">
  36. <a th:class="${m == list.getCurrentPage() ? 'active' : ''}"
  37. th:each="m : ${#numbers.sequence(list.getStartPage(), list.getEndPage())}"
  38. th:onclick="moveNoticePage([[${m}]])"
  39. th:text="${m}"></a>
  40. </div>
  41. <div class="next">
  42. <img th:if="${list.getNextPage() == 0}" src="/images/icon/next.png">
  43. <img th:if="${list.getNextPage() > 0}" class="active" src="/images/icon/next_active.png" alt="다음">
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. <th:block th:include="/include/footer.html"></th:block>
  50. </body>
  51. </html>
  52. <script>
  53. function moveNoticePage(page) {
  54. const activePage = $(".pages > a.active");
  55. if (activePage[0] && activePage.text() == page ) {
  56. return;
  57. }
  58. let searchText = '';
  59. let searchType = '';
  60. window.location.href = '/phits/notice-list?page=' + page + '&searchText='+searchText+'&searchType=' + searchType;
  61. }
  62. </script>