post.blade.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <table class="table">
  2. <caption>
  3. {{-- 분류/정렬/목록 수 --}}
  4. @include('desktop.board.component.tab')
  5. </caption>
  6. <colgroup>
  7. <col width="6%"/>
  8. <col width="*"/>
  9. <col width="14%"/>
  10. <col width="14%"/>
  11. <col width="8%"/>
  12. <col width="8%"/>
  13. </colgroup>
  14. <thead>
  15. <tr>
  16. <th>번호</th>
  17. <th>제목</th>
  18. <th>작성자</th>
  19. <th>작성일</th>
  20. <th>조회</th>
  21. <th>추천</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {{-- 공지사항 --}}
  26. @include('desktop.board.component.notice')
  27. {{-- 일반 게시글 --}}
  28. @if($posts->total > 0)
  29. @foreach($posts->list as $row)
  30. <tr>
  31. <td>{{ $row->num }}</td>
  32. <td class="text-start">
  33. @if($boardMeta->use_category && $row->categoryName)
  34. <label>
  35. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" rel="search">
  36. [{{ $row->categoryName }}]
  37. </a>
  38. </label>
  39. @endif
  40. @if($row->is_secret)
  41. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  42. <i class="fas fa-lock"></i> 비밀글입니다.
  43. </a>
  44. @elseif($row->isBlame)
  45. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  46. @else
  47. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  48. @endif
  49. @if($row->comment_rows > 0)
  50. <var>[{{ $row->comment_rows }}]</var>
  51. @endif
  52. @if($row->file_rows > 0)
  53. <i class="fas fa-save"></i>
  54. @endif
  55. @if($row->link_rows > 0)
  56. <i class="fas fa-external-link-alt"></i>
  57. @endif
  58. @if($row->image_rows > 0)
  59. <i class="fas fa-image"></i>
  60. @endif
  61. @if($row->isNew)
  62. <span class="badge bg-warning text-dark">New</span>
  63. @endif
  64. @if($row->isHot)
  65. <span class="badge bg-danger">Hot</span>
  66. @endif
  67. </td>
  68. <td>{{ $row->user->name }}</td>
  69. <td>{{ $row->createdAt }}</td>
  70. <td>{{ $row->hit }}</td>
  71. <td>{{ $row->like }}</td>
  72. </tr>
  73. @endforeach
  74. @else
  75. <tr>
  76. <td colspan="6" class="p-5">
  77. 게시글이 존재하지 않습니다.
  78. </td>
  79. </tr>
  80. @endif
  81. </tbody>
  82. @if($posts->total > 0)
  83. <tfoot>
  84. <tr>
  85. <td colspan="6">
  86. {{ $posts->list->onEachSide($params->pageCount)->links('desktop.board.component.pagination') }}
  87. </td>
  88. </tr>
  89. </tfoot>
  90. @endif
  91. </table>