| 
									
										
										
										
											2017-09-10 00:06:30 +08:00
										 |  |  | <div class="comment-box" comment="{{ $comment->id }}" local-id="{{$comment->local_id}}" parent-id="{{$comment->parent_id}}" id="comment{{$comment->local_id}}"> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |     <div class="header"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         <div class="float right actions"> | 
					
						
							|  |  |  |             @if(userCan('comment-update', $comment)) | 
					
						
							| 
									
										
										
										
											2018-02-17 21:30:52 +08:00
										 |  |  |                 <button type="button" class="text-button" action="edit" title="{{ trans('common.edit') }}">@icon('edit')</button> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |             @endif | 
					
						
							|  |  |  |             @if(userCan('comment-create-all')) | 
					
						
							| 
									
										
										
										
											2018-02-18 03:49:00 +08:00
										 |  |  |                 <button type="button" class="text-button" action="reply" title="{{ trans('common.reply') }}">@icon('reply')</button> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |             @endif | 
					
						
							|  |  |  |             @if(userCan('comment-delete', $comment)) | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 <div dropdown class="dropdown-container"> | 
					
						
							| 
									
										
										
										
											2018-02-17 21:30:52 +08:00
										 |  |  |                     <button type="button" dropdown-toggle class="text-button" title="{{ trans('common.delete') }}">@icon('delete')</button> | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  |                     <ul> | 
					
						
							|  |  |  |                         <li class="padded"><small class="text-muted">{{trans('entities.comment_delete_confirm')}}</small></li> | 
					
						
							| 
									
										
										
										
											2018-02-17 21:30:52 +08:00
										 |  |  |                         <li><a action="delete" class="text-button neg" >@icon('delete'){{ trans('common.delete') }}</a></li> | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  |                     </ul> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |             @endif | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  |         <div class="meta"> | 
					
						
							|  |  |  |             <a href="#comment{{$comment->local_id}}" class="text-muted">#{{$comment->local_id}}</a>
 | 
					
						
							|  |  |  |                | 
					
						
							| 
									
										
										
										
											2017-09-10 00:06:30 +08:00
										 |  |  |             @if ($comment->createdBy) | 
					
						
							|  |  |  |                 <img width="50" src="{{ $comment->createdBy->getAvatar(50) }}" class="avatar" alt="{{ $comment->createdBy->name }}"> | 
					
						
							|  |  |  |                   | 
					
						
							|  |  |  |                 <a href="{{ $comment->createdBy->getProfileUrl() }}">{{ $comment->createdBy->name }}</a> | 
					
						
							|  |  |  |             @else | 
					
						
							|  |  |  |                 <span>{{ trans('common.deleted_user') }}</span> | 
					
						
							|  |  |  |             @endif | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  |             <span title="{{ $comment->created_at }}"> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |             {{ trans('entities.comment_created', ['createDiff' => $comment->created]) }} | 
					
						
							|  |  |  |         </span> | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  |             @if($comment->isUpdated()) | 
					
						
							|  |  |  |                 <span title="{{ $comment->updated_at }}"> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |                 •  | 
					
						
							| 
									
										
										
										
											2017-09-10 00:06:30 +08:00
										 |  |  |                     {{ trans('entities.comment_updated', ['updateDiff' => $comment->updated, 'username' => $comment->updatedBy? $comment->updatedBy->name : trans('common.deleted_user')]) }} | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |             </span> | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  |             @endif | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2017-09-09 22:56:24 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     @if ($comment->parent_id) | 
					
						
							|  |  |  |         <div class="reply-row primary-background-light text-muted"> | 
					
						
							|  |  |  |             {!! trans('entities.comment_in_reply_to', ['commentId' => '<a href="#comment'.$comment->parent_id.'">#'.$comment->parent_id.'</a>']) !!} | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     @endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |     <div comment-content class="content"> | 
					
						
							| 
									
										
										
										
											2017-09-10 00:06:30 +08:00
										 |  |  |         <div class="form-group loading" style="display: none;"> | 
					
						
							|  |  |  |             @include('partials.loading-icon', ['text' => trans('entities.comment_deleting')]) | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |         {!! $comment->html  !!} | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @if(userCan('comment-update', $comment)) | 
					
						
							|  |  |  |         <div comment-edit-container style="display: none;" class="content"> | 
					
						
							|  |  |  |             <form novalidate> | 
					
						
							|  |  |  |                 <div class="form-group"> | 
					
						
							|  |  |  |                     <textarea name="markdown" rows="3" v-model="comment.text" placeholder="{{ trans('entities.comment_placeholder') }}">{{ $comment->text }}</textarea> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |                 <div class="form-group text-right"> | 
					
						
							|  |  |  |                     <button type="button" class="button outline" action="closeUpdateForm">{{ trans('common.cancel') }}</button> | 
					
						
							|  |  |  |                     <button type="submit" class="button pos">{{ trans('entities.comment_save') }}</button> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2017-09-10 00:06:30 +08:00
										 |  |  |                 <div class="form-group loading" style="display: none;"> | 
					
						
							|  |  |  |                     @include('partials.loading-icon', ['text' => trans('entities.comment_saving')]) | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2017-09-03 23:37:51 +08:00
										 |  |  |             </form> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     @endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </div> |