@php $comments = app()->make(Leantime\Domain\Comments\Repositories\Comments::class); $formUrl = CURRENT_URL; $formHash = md5($formUrl); // Controller may not redirect. Make sure delComment is only added once if (str_contains($formUrl, '?delComment=')) { $urlParts = explode('?delComment=', $formUrl); $deleteUrlBase = $urlParts[0] . '?delComment='; } else { $deleteUrlBase = $formUrl . '?delComment='; } @endphp
@if ($login::userIsAtLeast($roles::$commenter))
@endif
@foreach ($comments as $row)
{!! sprintf(__('text.written_on'), format($row['date'])->date(), format($row['date'])->time()) !!} @if ($login::userIsAtLeast($roles::$editor))
@endif
{!! sprintf(__('text.full_name'), $tpl->escape($row['firstname']), $tpl->escape($row['lastname'])) !!}
{!! $tpl->escapeMinimal($row['text']) !!}
@if ($comments->getReplies($row['id'])) @foreach ($comments->getReplies($row['id']) as $comment)
{!! sprintf(__('text.written_on'), format($comment['date'])->date(), format($comment['date'])->time()) !!}
{!! sprintf(__('text.full_name'), $tpl->escape($comment['firstname']), $tpl->escape($comment['lastname'])) !!}
{!! $tpl->escapeMinimal($comment['text']) !!}
@endforeach @endif
@endforeach