FIX: fix error on comments overview when article was deleted

This commit is contained in:
Michal Kváček
2016-10-12 21:22:28 +02:00
parent deb094b5c9
commit 686edf1c6f
2 changed files with 17 additions and 7 deletions
@@ -21,19 +21,28 @@
</p>
</div>
<div class="card-footer">
@lang('article::comments.createdAt', ['date' => \App\Helpers\Template::date($comment->created_at)]) |
@lang('article::comments.createdAt', ['date' => \App\Helpers\Template::date($comment->created_at)])
|
@lang('article::comments.commentedArticle'): <a href="{{route('page.content', ['url' => $comment->article->url])}}" target="_blank">
{{$comment->article->title}}
</a>
@lang('article::comments.commentedArticle'):
@if($comment->article)
<a href="{{route('page.content', ['url' => $comment->article->url])}}" target="_blank">
{{$comment->article->title}}
</a>
@else
@lang('article::comments.unknownArticle')
@endif
<div class="pull-right">
@if (!$comment->approved)
<a href="{{route('comments.approve', ['id' => $comment->id])}}" class="btn btn-sm btn-success" title="@lang('article::comments.approve')"
<a href="{{route('comments.approve', ['id' => $comment->id])}}"
class="btn btn-sm btn-success" title="@lang('article::comments.approve')"
data-toggle="tooltip"><i class="fa fa-fw fa-check"></i></a>
@endif
<a href="{{route('comments.delete', ['id' => $comment->id])}}" class="btn btn-sm confirm btn-warning"><i class="fa fa-fw fa-trash"></i></a>
<a href="{{route('comments.delete', ['id' => $comment->id])}}"
class="btn btn-sm confirm btn-warning"><i class="fa fa-fw fa-trash"></i></a>
</div>
</div>