| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <input type="hidden" name="total" id="total" value="{{ $comment->total }}"/>
- <input type="hidden" name="page" id="page" value="{{ $params->page }}"/>
- <input type="hidden" name="per_page" id="perPage" value="{{ $params->perPage }}"/>
- @if($comment->total > 0)
- @foreach($comment->list as $row)
- @continue($row->is_delete && $row->replyRows <= 0 && $row->depth == 0) {{-- 삭제된 댓글이며 답변이 없으면 비공개 --}}
- <ul id="comment_{{ $row->comment_id }}" style="margin-left: {{ ($row->depth > 0 ? $row->depth * 25 : 0) }}px;">
- <li class="media">
- @if($row->is_delete)
- @if($row->isBlind)
- 관리자에 의해 차단된 댓글입니다.
- @else
- 작성자에 의해 삭제된 댓글입니다.
- @endif
- @elseif($boardMeta->comment_blame_blind_count && $row->blame >= $boardMeta->comment_blame_blind_count)
- 신고 누적으로 비공개 처리되었습니다. 해당 댓글은 관리자 확인 후 이용규칙에 따라 처리됩니다.
- @else
- @if($boardMeta->use_comment_profile)
- <img src="{{ $row->user->thumb }}" class="media-thumb" width="82" height="82"/>
- @endif
- <div class="media-body">
- <form name="f_comment_list" class="f-comment-list" novalidate accept-charset="UTF-8">
- <input type="hidden" name="bid" value="{{ $row->board_id }}"/>
- <input type="hidden" name="pid" value="{{ $row->post_id }}"/>
- <input type="hidden" name="cid" value="{{ $row->comment_id }}"/>
- <input type="hidden" name="content" value="{{ $row->content }}"/>
- <input type="hidden" name="is_secret" value="{{ $row->is_secret }}"/>
- <dl>
- <dt>
- <div class="row">
- <div class="col">
- <strong @if($row->user_id == UID) class="text-primary" @endif>{{ $row->user->name }}</strong><span>{{ $row->createdAt }}</span>
- </div>
- <div class="col-auto">
- <div class="btn-group btn-cmt-manager">
- <button type="button" name="btn_comment_manager" class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown" data-bs-offset="0,5">관리</button>
- <div class="dropdown-menu dropdown-menu-right w-auto">
- @auth
- @if($row->user_id == UID)
- @if(!$boardMeta->use_comment_not_edit || IS_ADMIN) {{-- 수정 금지 --}}
- <button type="button" name="btn_comment_modify" class="dropdown-item btn-comment-modify">수정</button>
- @endif
- <button type="button" name="btn_comment_delete" class="dropdown-item btn-comment-delete">삭제</button>
- @endif
- @endauth
- @if($boardMeta->use_comment_blame)
- <button type="button" name="btn_comment_blame" class="dropdown-item btn-comment-blame" data-bs-toggle="modal" data-bs-target="#commentBlameModal">신고</button>
- @endif
- </div>
- </div>
- </div>
- </div>
- </dt>
- <dd>
- <p>
- @if($row->is_secret)
- <i class="fas fa-lock"></i>
- @if($row->user_id != UID)
- @php $row->content = '비밀글입니다.'; @endphp
- @endif
- @endif
- {!! nl2br($row->content) !!}
- </p>
- </dd>
- <dd>
- @if($boardMeta->use_comment_like)
- <button type="button" name="btn_comment_like" class="btn-comment-like" value="1" data-active="{{ $row->isLike ? 1 : 0 }}" data-rows="{{ $row->like }}">
- @if($row->isLike)
- <i class="fas fa-thumbs-up"></i>
- @else
- <i class="far fa-thumbs-up"></i>
- @endif
- <span>{{ $row->like }}</span>
- </button>
- @endif
- @if($boardMeta->use_comment_dislike)
- <button type="button" name="btn_comment_dislike" class="btn-comment-dislike" value="2" data-active="{{ $row->isDislike ? 1 : 0 }}" data-rows="{{ $row->dislike }}">
- @if($row->isDislike)
- <i class="fas fa-thumbs-down"></i>
- @else
- <i class="far fa-thumbs-down"></i>
- @endif
- <span>{{ $row->dislike }}</span>
- </button>
- @endif
- <button type="button" name="btn_comment_reply" class="btn-comment-reply">답글</button>
- </dd>
- </dl>
- </form>
- @auth
- <div id="fCommentWrite_{{ $row->comment_id }}"></div>
- @endauth
- </div>
- @endif
- </li>
- </ul>
- <hr/>
- @endforeach
- {{ $comment->pagination }}
- @endif
|