|
7 | 7 | id="comment{{$comment->local_id}}"
|
8 | 8 | class="comment-box">
|
9 | 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> |
13 |
| - |
| 10 | + <div class="flex-container-row justify-space-between wrap"> |
| 11 | + <div class="meta text-muted flex-container-row items-center"> |
14 | 12 | @if ($comment->createdBy)
|
15 |
| - <img width="50" src="{{ $comment->createdBy->getAvatar(50) }}" class="avatar" alt="{{ $comment->createdBy->name }}"> |
| 13 | + <img width="50" src="{{ $comment->createdBy->getAvatar(50) }}" class="avatar mx-xs" alt="{{ $comment->createdBy->name }}"> |
16 | 14 |
|
17 |
| - <a href="{{ $comment->createdBy->getProfileUrl() }}">{{ $comment->createdBy->name }}</a> |
| 15 | + <a href="{{ $comment->createdBy->getProfileUrl() }}">{{ $comment->createdBy->getShortName(16) }}</a> |
18 | 16 | @else
|
19 |
| - <span>{{ trans('common.deleted_user') }}</span> |
| 17 | + {{ trans('common.deleted_user') }} |
20 | 18 | @endif
|
21 |
| - <span title="{{ $comment->created_at }}">{{ trans('entities.comment_created', ['createDiff' => $comment->created]) }}</span> |
| 19 | + <span title="{{ $comment->created_at }}"> {{ trans('entities.comment_created', ['createDiff' => $comment->created]) }}</span> |
22 | 20 | @if($comment->isUpdated())
|
23 |
| - <span title="{{ $comment->updated_at }}"> |
24 |
| - • |
25 |
| - {{ trans('entities.comment_updated', ['updateDiff' => $comment->updated, 'username' => $comment->updatedBy? $comment->updatedBy->name : trans('common.deleted_user')]) }} |
26 |
| - </span> |
| 21 | + <span class="mx-xs">•</span> |
| 22 | + <span title="{{ trans('entities.comment_updated', ['updateDiff' => $comment->updated_at, 'username' => $comment->updatedBy->name ?? trans('common.deleted_user')]) }}"> |
| 23 | + {{ trans('entities.comment_updated_indicator') }} |
| 24 | + </span> |
27 | 25 | @endif
|
28 | 26 | </div>
|
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> |
32 |
| - @endif |
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> |
35 |
| - @endif |
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> |
41 |
| - <li> |
42 |
| - <button refs="page-comment@delete-button" type="button" class="text-button text-neg icon-item"> |
43 |
| - @icon('delete') |
44 |
| - <div>{{ trans('common.delete') }}</div> |
45 |
| - </button> |
46 |
| - </li> |
47 |
| - </ul> |
48 |
| - </div> |
49 |
| - @endif |
| 27 | + <div class="right-meta flex-container-row justify-flex-end items-center px-s"> |
| 28 | + <div class="actions mr-s"> |
| 29 | + @if(userCan('comment-create-all')) |
| 30 | + <button refs="page-comment@reply-button" type="button" class="text-button text-muted hover-underline p-xs">@icon('reply') {{ trans('common.reply') }}</button> |
| 31 | + @endif |
| 32 | + @if(userCan('comment-update', $comment)) |
| 33 | + <button refs="page-comment@edit-button" type="button" class="text-button text-muted hover-underline p-xs">@icon('edit') {{ trans('common.edit') }}</button> |
| 34 | + @endif |
| 35 | + @if(userCan('comment-delete', $comment)) |
| 36 | + <div component="dropdown" class="dropdown-container"> |
| 37 | + <button type="button" refs="dropdown@toggle" aria-haspopup="true" aria-expanded="false" class="text-button text-muted hover-underline p-xs">@icon('delete') {{ trans('common.delete') }}</button> |
| 38 | + <ul refs="dropdown@menu" class="dropdown-menu" role="menu"> |
| 39 | + <li class="px-m text-small text-muted pb-s">{{trans('entities.comment_delete_confirm')}}</li> |
| 40 | + <li> |
| 41 | + <button refs="page-comment@delete-button" type="button" class="text-button text-neg icon-item"> |
| 42 | + @icon('delete') |
| 43 | + <div>{{ trans('common.delete') }}</div> |
| 44 | + </button> |
| 45 | + </li> |
| 46 | + </ul> |
| 47 | + </div> |
| 48 | + @endif |
| 49 | + <span class="text-muted"> |
| 50 | + • |
| 51 | + </span> |
| 52 | + </div> |
| 53 | + <div> |
| 54 | + <a class="bold text-muted" href="#comment{{$comment->local_id}}">#{{$comment->local_id}}</a> |
| 55 | + </div> |
50 | 56 | </div>
|
51 | 57 | </div>
|
52 | 58 |
|
53 | 59 | </div>
|
54 | 60 |
|
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>']) !!} |
58 |
| - </div> |
59 |
| - @endif |
60 |
| - |
61 |
| - <div refs="page-comment@content-container" class="content px-s pb-s"> |
| 61 | + <div refs="page-comment@content-container" class="content px-m py-s"> |
| 62 | + @if ($comment->parent_id) |
| 63 | + <p class="comment-reply mb-xxs"> |
| 64 | + <a class="text-muted text-small" href="#comment{{ $comment->parent_id }}">@icon('reply'){{ trans('entities.comment_in_reply_to', ['commentId' => '#' . $comment->parent_id]) }}</a> |
| 65 | + </p> |
| 66 | + @endif |
62 | 67 | {!! $comment->html !!}
|
63 | 68 | </div>
|
64 | 69 |
|
65 | 70 | @if(userCan('comment-update', $comment))
|
66 |
| - <form novalidate refs="page-comment@form" hidden class="content px-s block"> |
| 71 | + <form novalidate refs="page-comment@form" hidden class="content pt-s px-s block"> |
67 | 72 | <div class="form-group description-input">
|
68 | 73 | <textarea refs="page-comment@input" name="markdown" rows="3" placeholder="{{ trans('entities.comment_placeholder') }}">{{ $comment->text }}</textarea>
|
69 | 74 | </div>
|
|
0 commit comments