2020-07-28 13:19:18 -04:00
|
|
|
<section component="page-comments"
|
|
|
|
option:page-comments:page-id="{{ $page->id }}"
|
|
|
|
option:page-comments:created-text="{{ trans('entities.comment_created_success') }}"
|
|
|
|
option:page-comments:count-text="{{ trans('entities.comment_count') }}"
|
2024-01-30 09:27:09 -05:00
|
|
|
option:page-comments:wysiwyg-language="{{ $locale->htmlLang() }}"
|
|
|
|
option:page-comments:wysiwyg-text-direction="{{ $locale->htmlDirection() }}"
|
2020-07-28 13:19:18 -04:00
|
|
|
class="comments-list"
|
|
|
|
aria-label="{{ trans('entities.comments') }}">
|
2019-07-06 09:52:25 -04:00
|
|
|
|
2023-06-07 12:47:37 -04:00
|
|
|
<div refs="page-comments@comment-count-bar" class="grid half left-focus v-center no-row-gap">
|
|
|
|
<h5 refs="page-comments@comments-title">{{ trans_choice('entities.comment_count', $commentTree->count(), ['count' => $commentTree->count()]) }}</h5>
|
2023-06-07 08:24:49 -04:00
|
|
|
@if ($commentTree->empty() && userCan('comment-create-all'))
|
2023-06-07 12:47:37 -04:00
|
|
|
<div class="text-m-right" refs="page-comments@add-button-container">
|
|
|
|
<button type="button"
|
|
|
|
refs="page-comments@add-comment-button"
|
2019-04-13 07:58:57 -04:00
|
|
|
class="button outline">{{ trans('entities.comment_add') }}</button>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-09-03 11:37:51 -04:00
|
|
|
|
2020-07-28 13:19:18 -04:00
|
|
|
<div refs="page-comments@commentContainer" class="comment-container">
|
2023-06-07 08:24:49 -04:00
|
|
|
@foreach($commentTree->get() as $branch)
|
2023-06-16 08:08:04 -04:00
|
|
|
@include('comments.comment-branch', ['branch' => $branch, 'readOnly' => false])
|
2017-09-03 11:37:51 -04:00
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(userCan('comment-create-all'))
|
2019-04-13 05:50:24 -04:00
|
|
|
@include('comments.create')
|
2023-06-07 08:24:49 -04:00
|
|
|
@if (!$commentTree->empty())
|
2020-07-28 13:19:18 -04:00
|
|
|
<div refs="page-comments@addButtonContainer" class="text-right">
|
2023-06-07 12:47:37 -04:00
|
|
|
<button type="button"
|
|
|
|
refs="page-comments@add-comment-button"
|
2019-08-25 06:02:58 -04:00
|
|
|
class="button outline">{{ trans('entities.comment_add') }}</button>
|
|
|
|
</div>
|
|
|
|
@endif
|
2019-04-13 07:58:57 -04:00
|
|
|
@endif
|
|
|
|
|
2024-01-30 09:27:09 -05:00
|
|
|
@if(userCan('comment-create-all') || $commentTree->canUpdateAny())
|
|
|
|
@push('post-app-scripts')
|
|
|
|
<script src="{{ versioned_asset('libs/tinymce/tinymce.min.js') }}" nonce="{{ $cspNonce }}"></script>
|
|
|
|
@include('form.editor-translations')
|
|
|
|
@endpush
|
2024-01-31 09:22:04 -05:00
|
|
|
@push('post-app-html')
|
|
|
|
@include('entities.selector-popup')
|
|
|
|
@endpush
|
2024-01-30 09:27:09 -05:00
|
|
|
@endif
|
|
|
|
|
2019-08-25 10:44:51 -04:00
|
|
|
</section>
|