comment.blade.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. @extends('mobile.layouts.app')
  2. @section('content')
  3. <div id="accountComment" class="container">
  4. @include('mobile.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-hover">
  26. <colgroup>
  27. <col style="width: 4%;"/>
  28. <col style="width: auto;"/>
  29. </colgroup>
  30. <thead>
  31. <tr>
  32. <th>
  33. <input type="checkbox" name="chk_all" id="chkAll" class="form-check-input" value="1"/>
  34. </th>
  35. <th>댓글 내용</th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. @if($comments->total > 0)
  40. @foreach($comments->list as $row)
  41. <tr id="comment_{{ $row->num }}">
  42. <td>
  43. <input type="checkbox" name="chk[]" class="form-check-input list-check-box" value="{{ $row->id }}"/>
  44. </td>
  45. <td>
  46. <p>
  47. <a href="{{ $row->viewURL }}?id={{ $row->id }}&page={{ $row->page }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">
  48. @if($row->is_secret)
  49. <i class="fas fa-lock"></i> {!! $row->content !!}
  50. @elseif($row->isBlame)
  51. <i class="fas fa-ban"></i> <del>{!! $row->content !!}</del>
  52. @else
  53. {!! $row->content !!}
  54. @endif
  55. </a>
  56. </p>
  57. <p>
  58. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">
  59. {{ $row->subject }}
  60. </a>
  61. @if($row->comment_rows > 0)
  62. <var>[{{ $row->comment_rows }}]</var>
  63. @endif
  64. @if($row->file_rows > 0)
  65. <i class="fas fa-save"></i>
  66. @endif
  67. @if($row->link_rows > 0)
  68. <i class="fas fa-external-link-alt"></i>
  69. @endif
  70. @if($row->image_rows > 0)
  71. <i class="fas fa-image"></i>
  72. @endif
  73. </p>
  74. <ul>
  75. <li>{{ $row->createdAt }}</li>
  76. <li><i class="fas fa-thumbs-up"></i> {{ $row->like }}</li>
  77. <li><i class="fas fa-thumbs-down"></i> {{ $row->dislike }}</li>
  78. </ul>
  79. </td>
  80. </tr>
  81. @endforeach
  82. @else
  83. <tr>
  84. <td colspan="2" class="p-5">
  85. 작성 댓글이 없습니다.
  86. </td>
  87. </tr>
  88. @endif
  89. </tbody>
  90. </table>
  91. @if($comments->total > 0)
  92. <div class="pagination">
  93. {{ $comments->list->onEachSide($params->pageCount)->links('component.pagination') }}
  94. </div>
  95. @endif
  96. <form name="f_account_comment" id="fAccountComment" method="post" action="{{ route('account.comment') }}" autocomplete="off" accept-charset="UTF-8">
  97. @csrf
  98. <input type="hidden" name="per_page" value="{{ $params->perPage }}"/>
  99. </form>
  100. </div>
  101. @endsection
  102. @push('styles')
  103. <link rel="stylesheet" href="{{ asset('css/mobile/account/comment.css') }}"/>
  104. @endpush
  105. @push('scripts')
  106. <script src="{{ asset('js/account/comment.js') }}" defer></script>
  107. @endpush