comment.blade.php 4.7 KB

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