2020-07-28 13:19:18 -04:00
|
|
|
<section component="page-comments"
|
|
|
|
option:page-comments:page-id="{{ $page->id }}"
|
|
|
|
option:page-comments:updated-text="{{ trans('entities.comment_updated_success') }}"
|
|
|
|
option:page-comments:deleted-text="{{ trans('entities.comment_deleted_success') }}"
|
|
|
|
option:page-comments:created-text="{{ trans('entities.comment_created_success') }}"
|
|
|
|
option:page-comments:count-text="{{ trans('entities.comment_count') }}"
|
|
|
|
class="comments-list"
|
|
|
|
aria-label="{{ trans('entities.comments') }}">
|
2019-07-06 09:52:25 -04:00
|
|
|
|
2020-07-28 13:19:18 -04:00
|
|
|
<div refs="page-comments@commentCountBar" class="grid half left-focus v-center no-row-gap">
|
2019-04-13 07:58:57 -04:00
|
|
|
<h5 comments-title>{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}</h5>
|
2019-08-25 06:02:58 -04:00
|
|
|
@if (count($page->comments) === 0 && userCan('comment-create-all'))
|
2020-07-28 13:19:18 -04:00
|
|
|
<div class="text-m-right" refs="page-comments@addButtonContainer">
|
2019-04-13 07:58:57 -04:00
|
|
|
<button type="button" action="addComment"
|
|
|
|
class="button outline">{{ trans('entities.comment_add') }}</button>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-09-03 11:37:51 -04:00
|
|
|
|
2020-07-28 13:19:18 -04:00
|
|
|
<div refs="page-comments@commentContainer" class="comment-container">
|
2017-09-03 11:37:51 -04:00
|
|
|
@foreach($page->comments as $comment)
|
|
|
|
@include('comments.comment', ['comment' => $comment])
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(userCan('comment-create-all'))
|
2019-04-13 05:50:24 -04:00
|
|
|
@include('comments.create')
|
2017-09-03 11:37:51 -04:00
|
|
|
|
2019-08-25 06:02:58 -04:00
|
|
|
@if (count($page->comments) > 0)
|
2020-07-28 13:19:18 -04:00
|
|
|
<div refs="page-comments@addButtonContainer" class="text-right">
|
2019-08-25 06:02:58 -04:00
|
|
|
<button type="button" action="addComment"
|
|
|
|
class="button outline">{{ trans('entities.comment_add') }}</button>
|
|
|
|
</div>
|
|
|
|
@endif
|
2019-04-13 07:58:57 -04:00
|
|
|
@endif
|
|
|
|
|
2019-08-25 10:44:51 -04:00
|
|
|
</section>
|