comment.blade.php 4.7 KB

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