post.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. @extends('desktop.layouts.app')
  2. @section('content')
  3. <div id="accountPost" class="container">
  4. @include('desktop.account.navTabs')
  5. <h4>작성 게시글</h4>
  6. <hr/>
  7. <table class="table table-bordered table-hover">
  8. <caption>
  9. <div class="row g-2">
  10. <div class="col align-self-center">
  11. <span>Total : {{ $posts->total }}</span>
  12. </div>
  13. <div class="col-auto">
  14. <button type="button" id="btnAccountPostDelete" class="btn btn-dark">선택삭제</button>
  15. </div>
  16. <div class="col-auto text-end">
  17. <select name="per_page" id="perPage" class="form-select">
  18. <option value="10" @if($params->perPage == 10) selected @endif>10개씩</option>
  19. <option value="15" @if($params->perPage == 15) selected @endif>15개씩</option>
  20. <option value="20" @if($params->perPage == 20) selected @endif>20개씩</option>
  21. <option value="30" @if($params->perPage == 30) selected @endif>30개씩</option>
  22. <option value="40" @if($params->perPage == 40) selected @endif>40개씩</option>
  23. <option value="50" @if($params->perPage == 50) selected @endif>50개씩</option>
  24. </select>
  25. </div>
  26. </div>
  27. </caption>
  28. <colgroup>
  29. <col width="4%"/>
  30. <col width="70px"/>
  31. <col width="90px"/>
  32. <col width="*"/>
  33. <col width="130px"/>
  34. <col width="100px"/>
  35. </colgroup>
  36. <thead>
  37. <tr>
  38. <th>
  39. <input type="checkbox" name="chk_all" id="chkAll" class="form-check-input" value="1"/>
  40. </th>
  41. <th>번호</th>
  42. <th>게시판</th>
  43. <th>제목</th>
  44. <th>작성일시</th>
  45. <th>조회수</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. @if($posts->total > 0)
  50. @foreach($posts->list as $row)
  51. <tr id="post_{{ $row->num }}">
  52. <td>
  53. <input type="checkbox" name="chk[]" class="form-check-input list-check-box" value="{{ $row->id }}"/>
  54. </td>
  55. <td>{{ $row->num }}</td>
  56. <td>{{ $row->boardName }}</td>
  57. <td class="text-start">
  58. @if($row->categoryName)
  59. <label>[{{ $row->categoryName }}]</label>
  60. @endif
  61. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">{{ $row->subject }}</a>
  62. @if($row->is_secret)
  63. <i class="fas fa-lock"></i>
  64. @endif
  65. @if($row->comment_rows > 0)
  66. <var>[{{ $row->comment_rows }}]</var>
  67. @endif
  68. @if($row->file_rows > 0)
  69. <i class="fas fa-save"></i>
  70. @endif
  71. @if($row->link_rows > 0)
  72. <i class="fas fa-external-link-alt"></i>
  73. @endif
  74. @if($row->image_rows > 0)
  75. <i class="fas fa-image"></i>
  76. @endif
  77. </td>
  78. <td>{{ $row->createdAt }}</td>
  79. <td>{{ $row->hit }}</td>
  80. </tr>
  81. @endforeach
  82. @else
  83. <tr>
  84. <td colspan="6" class="p-5 text-center">
  85. 작성 게시글이 없습니다.
  86. </td>
  87. </tr>
  88. @endif
  89. </tbody>
  90. </table>
  91. @if($posts->total > 0)
  92. <div class="pagination">
  93. {{ $posts->list->onEachSide($params->pageCount)->links('component.pagination') }}
  94. </div>
  95. @endif
  96. <form name="f_account_post" id="fAccountPost" method="post" action="{{ route('account.post') }}" autocomplete="off" accept-charset="UTF-8">
  97. @csrf
  98. <input type="hidden" name="per_page" value="{{ $params->perPage }}"/>
  99. </form>
  100. </div>
  101. @endsection
  102. @push('styles')
  103. <link rel="stylesheet" href="{{ asset('css/desktop/account/post.css') }}"/>
  104. @endpush
  105. @push('scripts')
  106. <script src="{{ asset('js/account/post.js') }}" defer></script>
  107. @endpush