X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/4bf77f67ddd4703f2e99da99306aa8038b0d238f..refs/pull/5721/head:/resources/views/comments/comments.blade.php diff --git a/resources/views/comments/comments.blade.php b/resources/views/comments/comments.blade.php index 5bfcc31bd..a5f0168a5 100644 --- a/resources/views/comments/comments.blade.php +++ b/resources/views/comments/comments.blade.php @@ -1,37 +1,80 @@ -
+
- @exposeTranslations([ - 'entities.comment_updated_success', - 'entities.comment_deleted_success', - 'entities.comment_created_success', - 'entities.comment_count', - ]) - -
-
{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}
- @if (count($page->comments) === 0 && userCan('comment-create-all')) -
- +
+
+ + +
+ @if ($commentTree->empty() && userCan('comment-create-all')) +
+
@endif
-
- @foreach($page->comments as $comment) - @include('comments.comment', ['comment' => $comment]) - @endforeach -
+
+
+ @foreach($commentTree->getActive() as $branch) + @include('comments.comment-branch', ['branch' => $branch, 'readOnly' => false]) + @endforeach +
- @if(userCan('comment-create-all')) - @include('comments.create') +

{{ trans('entities.comment_none') }}

- @if (count($page->comments) > 0) -
- -
+ @if(userCan('comment-create-all')) + @include('comments.create') + @if (!$commentTree->empty()) +
+ +
+ @endif @endif +
+ + + + @if(userCan('comment-create-all') || $commentTree->canUpdateAny()) + @push('body-end') + @include('form.editor-translations') + @include('entities.selector-popup') + @endpush @endif -
\ No newline at end of file +
\ No newline at end of file