post.blade.php 4.1 KB

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