1 <div component="page-comment"
2 option:page-comment:comment-id="{{ $comment->id }}"
3 option:page-comment:comment-local-id="{{ $comment->local_id }}"
4 option:page-comment:comment-parent-id="{{ $comment->parent_id }}"
5 option:page-comment:updated-text="{{ trans('entities.comment_updated_success') }}"
6 option:page-comment:deleted-text="{{ trans('entities.comment_deleted_success') }}"
7 id="comment{{$comment->local_id}}"
9 <div class="header p-s">
10 <div class="grid half left-focus no-gap v-center">
11 <div class="meta text-muted text-small">
12 <a href="#comment{{$comment->local_id}}">#{{$comment->local_id}}</a>
14 @if ($comment->createdBy)
15 <img width="50" src="{{ $comment->createdBy->getAvatar(50) }}" class="avatar" alt="{{ $comment->createdBy->name }}">
17 <a href="{{ $comment->createdBy->getProfileUrl() }}">{{ $comment->createdBy->name }}</a>
19 <span>{{ trans('common.deleted_user') }}</span>
21 <span title="{{ $comment->created_at }}">{{ trans('entities.comment_created', ['createDiff' => $comment->created]) }}</span>
22 @if($comment->isUpdated())
23 <span title="{{ $comment->updated_at }}">
25 {{ trans('entities.comment_updated', ['updateDiff' => $comment->updated, 'username' => $comment->updatedBy? $comment->updatedBy->name : trans('common.deleted_user')]) }}
29 <div class="actions text-right">
30 @if(userCan('comment-update', $comment))
31 <button refs="page-comment@edit-button" type="button" class="text-button icon p-xs" aria-label="{{ trans('common.edit') }}" title="{{ trans('common.edit') }}">@icon('edit')</button>
33 @if(userCan('comment-create-all'))
34 <button refs="page-comment@reply-button" type="button" class="text-button icon p-xs" aria-label="{{ trans('common.reply') }}" title="{{ trans('common.reply') }}">@icon('reply')</button>
36 @if(userCan('comment-delete', $comment))
37 <div component="dropdown" class="dropdown-container">
38 <button type="button" refs="dropdown@toggle" aria-haspopup="true" aria-expanded="false" class="text-button icon p-xs" title="{{ trans('common.delete') }}">@icon('delete')</button>
39 <ul refs="dropdown@menu" class="dropdown-menu" role="menu">
40 <li class="px-m text-small text-muted pb-s">{{trans('entities.comment_delete_confirm')}}</li>
42 <button refs="page-comment@delete-button" type="button" class="text-button text-neg icon-item">
44 <div>{{ trans('common.delete') }}</div>
55 @if ($comment->parent_id)
56 <div class="reply-row primary-background-light text-muted px-s py-xs mb-s">
57 {!! trans('entities.comment_in_reply_to', ['commentId' => '<a href="#comment'.$comment->parent_id.'">#'.$comment->parent_id.'</a>']) !!}
61 <div refs="page-comment@content-container" class="content px-s pb-s">
62 {!! $comment->html !!}
65 @if(userCan('comment-update', $comment))
66 <form novalidate refs="page-comment@form" hidden class="content px-s block">
67 <div class="form-group description-input">
68 <textarea refs="page-comment@input" name="markdown" rows="3" placeholder="{{ trans('entities.comment_placeholder') }}">{{ $comment->text }}</textarea>
70 <div class="form-group text-right">
71 <button type="button" class="button outline" refs="page-comment@form-cancel">{{ trans('common.cancel') }}</button>
72 <button type="submit" class="button">{{ trans('entities.comment_save') }}</button>