]> BookStack Code Mirror - bookstack/blob - resources/views/comments/comments.blade.php
Dependancies: Updated PHP deps via composer
[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          class="comments-list"
6          aria-label="{{ trans('entities.comments') }}">
7
8     <div refs="page-comments@comment-count-bar" class="grid half left-focus v-center no-row-gap">
9         <h5 refs="page-comments@comments-title">{{ trans_choice('entities.comment_count', $commentTree->count(), ['count' => $commentTree->count()]) }}</h5>
10         @if ($commentTree->empty() && userCan('comment-create-all'))
11             <div class="text-m-right" refs="page-comments@add-button-container">
12                 <button type="button"
13                         refs="page-comments@add-comment-button"
14                         class="button outline">{{ trans('entities.comment_add') }}</button>
15             </div>
16         @endif
17     </div>
18
19     <div refs="page-comments@commentContainer" class="comment-container">
20         @foreach($commentTree->get() as $branch)
21             @include('comments.comment-branch', ['branch' => $branch, 'readOnly' => false])
22         @endforeach
23     </div>
24
25     @if(userCan('comment-create-all'))
26         @include('comments.create')
27
28         @if (!$commentTree->empty())
29             <div refs="page-comments@addButtonContainer" class="text-right">
30                 <button type="button"
31                         refs="page-comments@add-comment-button"
32                         class="button outline">{{ trans('entities.comment_add') }}</button>
33             </div>
34         @endif
35     @endif
36
37 </section>