@php $currentIndent ??= 0; if (!view()->exists($paginationView = Theme::getThemeNamespace('partials.pagination'))) { $paginationView = 'pagination::bootstrap-5'; } $currentIp = \Botble\Base\Supports\Helper::getIpFromThirdParty(); $allowAuthorDelete = \FriendsOfBotble\Comment\Support\CommentHelper::isAllowAuthorDelete(); $currentUser = $allowAuthorDelete ? \FriendsOfBotble\Comment\Support\CommentHelper::getAuthorizedUser() : null; @endphp
@foreach ($comments as $comment) @continue(!$comment->is_approved && $comment->ip_address !== $currentIp)
@if ($comment->website) {{ $comment->name }} @else {{ $comment->name }} @endif
@if (!$comment->is_approved) {{ trans('plugins/fob-comment::comment.front.list.waiting_for_approval_message') }} @endif @if ($comment->is_admin) {!! BaseHelper::clean($comment->formatted_content) !!} @else

{!! $comment->formatted_content !!}

@endif
@if ($comment->replies->isNotEmpty()) @include('plugins/fob-comment::partials.list', [ 'comments' => $comment->replies, 'currentIndent' => $currentIndent + 1, ]) @endif
@endforeach
@if ($comments instanceof \Illuminate\Contracts\Pagination\LengthAwarePaginator && $comments->hasPages())
{{ $comments->appends(request()->except('page'))->links($paginationView) }}
@endif