latest.blade.php 12 KB

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