]> BookStack Code Mirror - bookstack/blob - resources/views/comments/comments.blade.php
Fixes padding issues of the sidebar's items
[bookstack] / resources / views / comments / comments.blade.php
1 <section component="page-comments"
2          option:page-comments:page-id="{{ $page->id }}"
3          option:page-comments:updated-text="{{ trans('entities.comment_updated_success') }}"
4          option:page-comments:deleted-text="{{ trans('entities.comment_deleted_success') }}"
5          option:page-comments:created-text="{{ trans('entities.comment_created_success') }}"
6          option:page-comments:count-text="{{ trans('entities.comment_count') }}"
7          class="comments-list"
8          aria-label="{{ trans('entities.comments') }}">
9
10     <div refs="page-comments@commentCountBar" 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" refs="page-comments@addButtonContainer">
14                 <button type="button" action="addComment"
15                         class="button outline">{{ trans('entities.comment_add') }}</button>
16             </div>
17         @endif
18     </div>
19
20     <div refs="page-comments@commentContainer" class="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 refs="page-comments@addButtonContainer" class="text-right">
31                 <button type="button" action="addComment"
32                         class="button outline">{{ trans('entities.comment_add') }}</button>
33             </div>
34         @endif
35     @endif
36
37 </section>