latest.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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('board.component.pagination') }}
  95. </td>
  96. </tr>
  97. </tfoot>
  98. @endif
  99. </table>
  100. {{-- 1:1문의 종료 --}}
  101. @elseif($boardMeta->board_layout_type == BOARD_LAYOUT_TYPE_0)
  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_TYPE_1)
  181. {{-- 사진/동영상 게시글 시작 --}}
  182. <table class="table">
  183. <tbody>
  184. @if($latest->total > 0)
  185. <tr>
  186. <td>
  187. <section>
  188. @foreach($latest->list as $row)
  189. <figure id="figure_{{ $row->num }}" class="figure">
  190. @if($row->thumbnail)
  191. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  192. <img src="{{ $row->thumbnail }}" class="figure-img img-fluid rounded" alt="{{ $row->subject }}" onerror="this.src='/images/default/no_image.png'"/>
  193. </a>
  194. @endif
  195. <figcaption class="figure-caption">
  196. @if($boardMeta->use_category && $row->categoryName)
  197. <label>
  198. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" rel="search">
  199. [{{ $row->categoryName }}]
  200. </a>
  201. </label>
  202. @endif
  203. @if($row->is_secret)
  204. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  205. <i class="fas fa-lock"></i> 비밀글입니다.
  206. </a>
  207. @elseif($row->isBlame)
  208. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  209. @else
  210. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  211. @endif
  212. @if($row->comment_rows > 0)
  213. <var>[{{ $row->comment_rows }}]</var>
  214. @endif
  215. @if($row->file_rows > 0)
  216. <i class="fas fa-save"></i>
  217. @endif
  218. @if($row->link_rows > 0)
  219. <i class="fas fa-external-link-alt"></i>
  220. @endif
  221. @if($row->image_rows > 0)
  222. <i class="fas fa-image"></i>
  223. @endif
  224. @if($row->isNew)
  225. <span class="badge bg-warning text-dark">New</span>
  226. @endif
  227. @if($row->isHot)
  228. <span class="badge bg-danger">Hot</span>
  229. @endif
  230. </figcaption>
  231. <strong>{{ $row->user->name }}</strong>
  232. <ul>
  233. <li>{{ $row->createdAt }}</li>
  234. <li>조회 <small>{{ $row->hit }}</small></li>
  235. <li>좋아요 <small>{{ $row->like }}</small></li>
  236. </ul>
  237. </figure>
  238. @endforeach
  239. </section>
  240. </td>
  241. </tr>
  242. @else
  243. <tr>
  244. <td>
  245. 게시글이 존재하지 않습니다.
  246. </td>
  247. </tr>
  248. @endif
  249. </tbody>
  250. @if($latest->total > 0)
  251. <tfoot>
  252. <tr>
  253. <td>
  254. {{ $latest->list->onEachSide($pageCount)->links('board.component.pagination') }}
  255. </td>
  256. </tr>
  257. </tfoot>
  258. @endif
  259. </table>
  260. {{-- 사진/동영상 게시글 종료 --}}
  261. @endif
  262. </div>
  263. @endif
  264. @endif
  265. @push('styles')
  266. <link rel="stylesheet" href="{{ asset('css/desktop/board/latest.css') }}"/>
  267. @endpush