comment.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. @extends('desktop.layouts.app')
  2. @section('content')
  3. <div id="accountComment" class="container">
  4. @include('desktop.account.navTabs')
  5. <h4>작성 댓글</h4>
  6. <hr/>
  7. <table class="table table-bordered table-hover">
  8. <caption>
  9. <div class="row g-2">
  10. <div class="col align-self-center">
  11. <span>Total : {{ $comments->total }}</span>
  12. </div>
  13. <div class="col-auto">
  14. <button type="button" id="btnAccountCommentDelete" class="btn btn-dark">선택삭제</button>
  15. </div>
  16. <div class="col-auto text-end">
  17. <select name="per_page" id="perPage" class="form-select">
  18. <option value="10" @if($params->perPage == 10) selected @endif>10개씩</option>
  19. <option value="15" @if($params->perPage == 15) selected @endif>15개씩</option>
  20. <option value="20" @if($params->perPage == 20) selected @endif>20개씩</option>
  21. <option value="30" @if($params->perPage == 30) selected @endif>30개씩</option>
  22. <option value="40" @if($params->perPage == 40) selected @endif>40개씩</option>
  23. <option value="50" @if($params->perPage == 50) selected @endif>50개씩</option>
  24. </select>
  25. </div>
  26. </div>
  27. </caption>
  28. <colgroup>
  29. <col width="4%"/>
  30. <col width="70px"/>
  31. <col width="*"/>
  32. <col width="70px"/>
  33. <col width="70px"/>
  34. <col width="130px"/>
  35. </colgroup>
  36. <thead>
  37. <tr>
  38. <th>
  39. <input type="checkbox" name="chk_all" id="chkAll" class="form-check-input" value="1"/>
  40. </th>
  41. <th>번호</th>
  42. <th>댓글</th>
  43. <th>추천</th>
  44. <th>비추천</th>
  45. <th>작성일시</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. @if($comments->total > 0)
  50. @foreach($comments->list as $row)
  51. <tr id="comment_{{ $row->num }}">
  52. <td>
  53. <input type="checkbox" name="chk[]" class="form-check-input list-check-box" value="{{ $row->id }}"/>
  54. </td>
  55. <td>{{ $row->num }}</td>
  56. <td class="text-start">
  57. <p>
  58. <a href="{{ $row->viewURL }}?id={{ $row->id }}&page={{ $row->page }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">
  59. @if($row->is_secret)
  60. <i class="fas fa-lock"></i> {!! $row->content !!}
  61. @elseif($row->isBlame)
  62. <i class="fas fa-ban"></i> <del>{!! $row->content !!}</del>
  63. @else
  64. {!! $row->content !!}
  65. @endif
  66. </a>
  67. </p>
  68. <p>
  69. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">
  70. <small>{{ $row->subject }}</small>
  71. </a>
  72. @if($row->comment_rows > 0)
  73. <var>[{{ $row->comment_rows }}]</var>
  74. @endif
  75. @if($row->file_rows > 0)
  76. <i class="fas fa-save"></i>
  77. @endif
  78. @if($row->link_rows > 0)
  79. <i class="fas fa-external-link-alt"></i>
  80. @endif
  81. @if($row->image_rows > 0)
  82. <i class="fas fa-image"></i>
  83. @endif
  84. </p>
  85. </td>
  86. <td>{{ $row->like }}</td>
  87. <td>{{ $row->dislike }}</td>
  88. <td>{{ $row->createdAt }}</td>
  89. </tr>
  90. @endforeach
  91. @else
  92. <tr>
  93. <td colspan="6" class="p-5 text-center">
  94. 작성 댓글이 없습니다.
  95. </td>
  96. </tr>
  97. @endif
  98. </tbody>
  99. </table>
  100. @if($comments->total > 0)
  101. <div class="pagination">
  102. {{ $comments->list->onEachSide($params->pageCount)->links('component.pagination') }}
  103. </div>
  104. @endif
  105. <form name="f_account_comment" id="fAccountComment" method="post" action="{{ route('account.comment') }}" autocomplete="off" accept-charset="UTF-8">
  106. @csrf
  107. <input type="hidden" name="per_page" value="{{ $params->perPage }}"/>
  108. </form>
  109. </div>
  110. @endsection
  111. @push('styles')
  112. <link rel="stylesheet" href="{{ asset('css/desktop/account/comment.css') }}"/>
  113. @endpush
  114. @push('scripts')
  115. <script src="{{ asset('js/account/comment.js') }}" defer></script>
  116. @endpush