]> BookStack Code Mirror - bookstack/blob - resources/views/comments/comments.blade.php
New translations errors.php (Portuguese, Brazilian)
[bookstack] / resources / views / comments / comments.blade.php
1 <section page-comments page-id="{{ $page->id }}" class="comments-list" aria-label="{{ trans('entities.comments') }}">
2
3     @exposeTranslations([
4         'entities.comment_updated_success',
5         'entities.comment_deleted_success',
6         'entities.comment_created_success',
7         'entities.comment_count',
8     ])
9
10     <div comment-count-bar class="grid half left-focus v-center no-row-gap">
11         <h5 comments-title>{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}</h5>
12         @if (count($page->comments) === 0 && userCan('comment-create-all'))
13             <div class="text-m-right" comment-add-button-container>
14                 <button type="button" action="addComment"
15                         class="button outline">{{ trans('entities.comment_add') }}</button>
16             </div>
17         @endif
18     </div>
19
20     <div class="comment-container" comment-container>
21         @foreach($page->comments as $comment)
22             @include('comments.comment', ['comment' => $comment])
23         @endforeach
24     </div>
25
26     @if(userCan('comment-create-all'))
27         @include('comments.create')
28
29         @if (count($page->comments) > 0)
30             <div class="text-right" comment-add-button-container>
31                 <button type="button" action="addComment"
32                         class="button outline">{{ trans('entities.comment_add') }}</button>
33             </div>
34         @endif
35     @endif
36
37 </section>