2019-08-25 16:44:51 +02:00
|
|
|
<section page-comments page-id="{{ $page->id }}" class="comments-list" aria-label="{{ trans('entities.comments') }}">
|
2019-07-06 15:52:25 +02:00
|
|
|
|
|
|
|
@exposeTranslations([
|
|
|
|
'entities.comment_updated_success',
|
|
|
|
'entities.comment_deleted_success',
|
|
|
|
'entities.comment_created_success',
|
|
|
|
'entities.comment_count',
|
|
|
|
])
|
|
|
|
|
2019-05-27 14:10:48 +02:00
|
|
|
<div comment-count-bar class="grid half left-focus v-center no-row-gap">
|
2019-04-13 13:58:57 +02:00
|
|
|
<h5 comments-title>{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}</h5>
|
2019-08-25 12:02:58 +02:00
|
|
|
@if (count($page->comments) === 0 && userCan('comment-create-all'))
|
2019-05-27 14:10:48 +02:00
|
|
|
<div class="text-m-right" comment-add-button-container>
|
2019-04-13 13:58:57 +02:00
|
|
|
<button type="button" action="addComment"
|
|
|
|
class="button outline">{{ trans('entities.comment_add') }}</button>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-09-03 17:37:51 +02:00
|
|
|
|
|
|
|
<div class="comment-container" comment-container>
|
|
|
|
@foreach($page->comments as $comment)
|
|
|
|
@include('comments.comment', ['comment' => $comment])
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(userCan('comment-create-all'))
|
2019-04-13 11:50:24 +02:00
|
|
|
@include('comments.create')
|
2017-09-03 17:37:51 +02:00
|
|
|
|
2019-08-25 12:02:58 +02:00
|
|
|
@if (count($page->comments) > 0)
|
|
|
|
<div class="text-right" comment-add-button-container>
|
|
|
|
<button type="button" action="addComment"
|
|
|
|
class="button outline">{{ trans('entities.comment_add') }}</button>
|
|
|
|
</div>
|
|
|
|
@endif
|
2019-04-13 13:58:57 +02:00
|
|
|
@endif
|
|
|
|
|
2019-08-25 16:44:51 +02:00
|
|
|
</section>
|