1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed "Add comment" layout when no comments exist

This commit is contained in:
Dan Brown
2019-04-13 12:58:57 +01:00
parent cc24d478aa
commit d3cc261320
3 changed files with 30 additions and 8 deletions

View File

@ -1,5 +1,13 @@
<div page-comments page-id="{{ $page->id }}" class="comments-list">
<h5 comments-title>{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}</h5>
<div comment-count-bar class="grid half left-focus v-center">
<h5 comments-title>{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}</h5>
@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
</div>
<div class="comment-container" comment-container>
@foreach($page->comments as $comment)
@ -11,4 +19,11 @@
@include('comments.create')
@endif
@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
</div>