]> BookStack Code Mirror - bookstack/blob - resources/views/comments/comments.blade.php
Lexical: Fixed code in lists, removed extra old alignment code
[bookstack] / resources / views / comments / comments.blade.php
1 <section component="page-comments"
2          option:page-comments:page-id="{{ $page->id }}"
3          option:page-comments:created-text="{{ trans('entities.comment_created_success') }}"
4          option:page-comments:count-text="{{ trans('entities.comment_count') }}"
5          option:page-comments:wysiwyg-language="{{ $locale->htmlLang() }}"
6          option:page-comments:wysiwyg-text-direction="{{ $locale->htmlDirection() }}"
7          class="comments-list"
8          aria-label="{{ trans('entities.comments') }}">
9
10     <div refs="page-comments@comment-count-bar" class="grid half left-focus v-center no-row-gap">
11         <h5 refs="page-comments@comments-title">{{ trans_choice('entities.comment_count', $commentTree->count(), ['count' => $commentTree->count()]) }}</h5>
12         @if ($commentTree->empty() && userCan('comment-create-all'))
13             <div class="text-m-right" refs="page-comments@add-button-container">
14                 <button type="button"
15                         refs="page-comments@add-comment-button"
16                         class="button outline">{{ trans('entities.comment_add') }}</button>
17             </div>
18         @endif
19     </div>
20
21     <div refs="page-comments@commentContainer" class="comment-container">
22         @foreach($commentTree->get() as $branch)
23             @include('comments.comment-branch', ['branch' => $branch, 'readOnly' => false])
24         @endforeach
25     </div>
26
27     @if(userCan('comment-create-all'))
28         @include('comments.create')
29         @if (!$commentTree->empty())
30             <div refs="page-comments@addButtonContainer" class="text-right">
31                 <button type="button"
32                         refs="page-comments@add-comment-button"
33                         class="button outline">{{ trans('entities.comment_add') }}</button>
34             </div>
35         @endif
36     @endif
37
38     @if(userCan('comment-create-all') || $commentTree->canUpdateAny())
39         @push('body-end')
40             <script src="{{ versioned_asset('libs/tinymce/tinymce.min.js') }}" nonce="{{ $cspNonce }}" defer></script>
41             @include('form.editor-translations')
42             @include('entities.selector-popup')
43         @endpush
44     @endif
45
46 </section>