latest.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. @if($boardMeta->show_list_from_view)
  2. @if($latest && $latest->total > 0)
  3. <div id="latest">
  4. @if($boardMeta->use_personal)
  5. {{-- 1:1문의 시작 --}}
  6. <table class="table">
  7. <colgroup>
  8. <col width="6%"/>
  9. @if($boardMeta->use_category)
  10. <col width="8%"/>
  11. @endif
  12. <col width="*"/>
  13. <col width="14%"/>
  14. <col width="14%"/>
  15. <col width="8%"/>
  16. <col width="8%"/>
  17. </colgroup>
  18. <thead>
  19. <tr>
  20. <th>번호</th>
  21. @if($boardMeta->use_category)
  22. <th>분류</th>
  23. @endif
  24. <th>제목</th>
  25. <th>작성자</th>
  26. <th>작성일</th>
  27. <th>조회</th>
  28. <th>답변 여부</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. @foreach($latest->list as $row)
  33. <tr>
  34. <td>{{ $row->num }}</td>
  35. @if($boardMeta->use_category)
  36. <td>
  37. @if($row->categoryName)
  38. <label>
  39. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" class="me-0" rel="search">
  40. [{{ $row->categoryName }}]
  41. </a>
  42. </label>
  43. @else
  44. -
  45. @endif
  46. </td>
  47. @endif
  48. <td class="text-start">
  49. @if($row->is_secret)
  50. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  51. <i class="fas fa-lock"></i> 비밀글입니다.
  52. </a>
  53. @elseif($row->isBlame)
  54. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  55. @else
  56. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  57. @endif
  58. @if($row->comment_rows > 0)
  59. <var>[{{ $row->comment_rows }}]</var>
  60. @endif
  61. @if($row->file_rows > 0)
  62. <i class="fas fa-save"></i>
  63. @endif
  64. @if($row->link_rows > 0)
  65. <i class="fas fa-external-link-alt"></i>
  66. @endif
  67. @if($row->image_rows > 0)
  68. <i class="fas fa-image"></i>
  69. @endif
  70. @if($row->isNew)
  71. <span class="badge bg-warning text-dark">New</span>
  72. @endif
  73. @if($row->isHot)
  74. <span class="badge bg-danger">Hot</span>
  75. @endif
  76. </td>
  77. <td>{{ $row->user->name }}</td>
  78. <td>{{ $row->createdAt }}</td>
  79. <td>{{ $row->hit }}</td>
  80. <td>
  81. @if($row->is_reply)
  82. <span class="badge bg-success p-2">답변완료</span>
  83. @else
  84. <span class="badge bg-secondary p-2">접수완료</span>
  85. @endif
  86. </td>
  87. </tr>
  88. @endforeach
  89. </tbody>
  90. @if($latest->total > 0)
  91. <tfoot>
  92. <tr>
  93. <td colspan="7">
  94. {{ $latest->list->onEachSide($pageCount)->links('desktop.board.component.pagination') }}
  95. </td>
  96. </tr>
  97. </tfoot>
  98. @endif
  99. </table>
  100. {{-- 1:1문의 종료 --}}
  101. @elseif($boardMeta->board_layout_type == BOARD_LAYOUT_NORMAL)
  102. {{-- 일반 게시글 시작 --}}
  103. <table class="table">
  104. <colgroup>
  105. <col width="6%"/>
  106. <col width="*"/>
  107. <col width="14%"/>
  108. <col width="14%"/>
  109. <col width="8%"/>
  110. <col width="8%"/>
  111. </colgroup>
  112. <thead>
  113. <tr>
  114. <th>번호</th>
  115. <th>제목</th>
  116. <th>작성자</th>
  117. <th>작성일</th>
  118. <th>조회</th>
  119. <th>추천</th>
  120. </tr>
  121. </thead>
  122. <tbody>
  123. @foreach($latest->list as $row)
  124. <tr>
  125. <td>{{ $row->num }}</td>
  126. <td class="text-start">
  127. @if($boardMeta->use_category && $row->categoryName)
  128. <label>
  129. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" rel="search">
  130. [{{ $row->categoryName }}]
  131. </a>
  132. </label>
  133. @endif
  134. @if($row->is_secret)
  135. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  136. <i class="fas fa-lock"></i> 비밀글입니다.
  137. </a>
  138. @elseif($row->isBlame)
  139. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  140. @else
  141. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  142. @endif
  143. @if($row->comment_rows > 0)
  144. <var>[{{ $row->comment_rows }}]</var>
  145. @endif
  146. @if($row->file_rows > 0)
  147. <i class="fas fa-save"></i>
  148. @endif
  149. @if($row->link_rows > 0)
  150. <i class="fas fa-external-link-alt"></i>
  151. @endif
  152. @if($row->image_rows > 0)
  153. <i class="fas fa-image"></i>
  154. @endif
  155. @if($row->isNew)
  156. <span class="badge bg-warning text-dark">New</span>
  157. @endif
  158. @if($row->isHot)
  159. <span class="badge bg-danger">Hot</span>
  160. @endif
  161. </td>
  162. <td>{{ $row->user->name }}</td>
  163. <td>{{ $row->createdAt }}</td>
  164. <td>{{ $row->hit }}</td>
  165. <td>{{ $row->like }}</td>
  166. </tr>
  167. @endforeach
  168. </tbody>
  169. @if($latest->total > 0)
  170. <tfoot>
  171. <tr>
  172. <td colspan="7">
  173. {{ $latest->list->onEachSide($pageCount)->links('desktop.board.component.pagination') }}
  174. </td>
  175. </tr>
  176. </tfoot>
  177. @endif
  178. </table>
  179. {{-- 일반 게시글 종료 --}}
  180. @elseif($boardMeta->board_layout_type == BOARD_LAYOUT_MEDIA)
  181. {{-- 사진/동영상 게시글 시작 --}}
  182. @if($latest->total > 0)
  183. <div class="row row-cols-sm-4 row-cols-xl-6 gx-3 gy-4">
  184. @foreach($latest->list as $row)
  185. <div class="col">
  186. <figure class="figure h-100 d-flex flex-column">
  187. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" class="ratio ratio-4x3">
  188. @if($row->thumbnail)
  189. <img src="{{ $row->thumbnail }}" class="figure-img img-fluid rounded object-fit-cover" alt="{{ $row->subject }}" onerror="{{ NO_IMAGE_NORMAL_SRC }}'"/>
  190. @else
  191. <img src="{{ NO_IMAGE_NORMAL_SRC }}" class="figure-img img-fluid rounded object-fit-cover" alt="No Image"/>
  192. @endif
  193. </a>
  194. <figcaption class="figure-caption">
  195. @if($boardMeta->use_category && $row->categoryName)
  196. <label>
  197. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" rel="search">
  198. [{{ $row->categoryName }}]
  199. </a>
  200. </label>
  201. @endif
  202. @if($row->is_secret)
  203. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  204. <i class="fas fa-lock"></i> 비밀글입니다.
  205. </a>
  206. @elseif($row->isBlame)
  207. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  208. @else
  209. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  210. @endif
  211. @if($row->comment_rows > 0)
  212. <var>[{{ $row->comment_rows }}]</var>
  213. @endif
  214. @if($row->file_rows > 0)
  215. <i class="fas fa-save"></i>
  216. @endif
  217. @if($row->link_rows > 0)
  218. <i class="fas fa-external-link-alt"></i>
  219. @endif
  220. @if($row->image_rows > 0)
  221. <i class="fas fa-image"></i>
  222. @endif
  223. @if($row->isNew)
  224. <span class="badge bg-warning text-dark">New</span>
  225. @endif
  226. @if($row->isHot)
  227. <span class="badge bg-danger">Hot</span>
  228. @endif
  229. </figcaption>
  230. <strong>{{ $row->user->name }}</strong>
  231. <ul>
  232. <li>{{ $row->createdAt }}</li>
  233. <li>조회 <small>{{ $row->hit }}</small></li>
  234. <li>좋아요 <small>{{ $row->like }}</small></li>
  235. </ul>
  236. </figure>
  237. </div>
  238. @endforeach
  239. </div>
  240. @else
  241. <div class="p-5 text-center">
  242. 게시글이 존재하지 않습니다.
  243. </div>
  244. @endif
  245. <hr/>
  246. @if($latest->total > 0)
  247. {{ $latest->list->onEachSide($pageCount)->links('desktop.board.component.pagination') }}
  248. @endif
  249. {{-- 사진/동영상 게시글 종료 --}}
  250. @endif
  251. </div>
  252. @endif
  253. @endif
  254. @push('styles')
  255. <link rel="stylesheet" href="{{ asset('css/desktop/board/latest.css') }}"/>
  256. @endpush