latest.blade.php 12 KB

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