Skip to content

Commit d9483c7

Browse files
author
Shawn McCool
committed
add clickable profile images
1 parent 74cac18 commit d9483c7

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

app/views/forum/_comment.blade.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div class="comment" id="comment-{{ $comment->id }}">
2+
<div class="user">
3+
<a href="{{ $comment->author->profileUrl }}">{{ $comment->author->thumbnail }}</a>
4+
</div>
5+
<div class="content">
6+
@if($comment->id == $thread->id)
7+
<h1>{{ $comment->title }}</h1>
8+
<div class="tags">Tags: {{ $comment->tags->getTagList() }}</div>
9+
{{ $comment->body }}
10+
<ul class="meta">
11+
<li><i class="icon-time"></i> {{ $comment->created_ago }}</li>
12+
<li><i class="icon-user"></i><a href="{{ $comment->author->profileUrl }}"> {{ $comment->author->name }}</a></li>
13+
</ul>
14+
@else
15+
{{ $comment->body }}
16+
<ul class="meta">
17+
<li><i class="icon-time"></i> {{ $comment->created_ago }}</li>
18+
<li><i class="icon-user"></i> <a href="{{ $comment->author->profileUrl }}">{{ $comment->author->name }}</a></li>
19+
<li><i class="icon-link"></i> <a href="{{ $comment->commentUrl }}">Share</a></li>
20+
</ul>
21+
@endif
22+
</div>
23+
</div>

app/views/forum/thread.blade.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,7 @@
99
<div class="row forum">
1010
<div class="small-12 columns comments">
1111
@foreach($comments as $comment)
12-
<div class="comment" id="comment-{{ $comment->id }}">
13-
<div class="user">
14-
{{ $comment->author->thumbnail }}
15-
</div>
16-
<div class="content">
17-
@if($comment->id == $thread->id)
18-
<h1>{{ $comment->title }}</h1>
19-
<div class="tags">Tags: {{ $comment->tags->getTagList() }}</div>
20-
{{ $comment->body }}
21-
<ul class="meta">
22-
<li><i class="icon-time"></i> {{ $comment->created_ago }}</li>
23-
<li><i class="icon-user"></i><a href="{{ $comment->author->profileUrl }}"> {{ $comment->author->name }}</a></li>
24-
</ul>
25-
@else
26-
{{ $comment->body }}
27-
<ul class="meta">
28-
<li><i class="icon-time"></i> {{ $comment->created_ago }}</li>
29-
<li><i class="icon-user"></i> <a href="{{ $comment->author->profileUrl }}">{{ $comment->author->name }}</a></li>
30-
<li><i class="icon-link"></i> <a href="{{ $comment->commentUrl }}">Share</a></li>
31-
</ul>
32-
@endif
33-
</div>
34-
</div>
12+
@include('forum._comment')
3513
@endforeach
3614

3715
{{ $comments->links() }}

0 commit comments

Comments
 (0)