Skip to content

Commit 58da865

Browse files
author
Shawn McCool
committed
fix object bug
1 parent 5c4a8d3 commit 58da865

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

app/domain/Lio/Comments/CommentPresenter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function body()
4949

5050
public function bodySummary()
5151
{
52-
$body = MarkdownExtra::defaultTransform($this->resource->body);
53-
return Str::words($body, 50);
52+
$summary = Str::words($this->resource->body, 50);
53+
return App::make('markdown')->transform($summary);
5454
}
5555
}

app/views/users/profile.blade.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,44 @@
88
<section class="user-content">
99

1010

11-
@if(count($threads))
12-
<div class="half">
13-
<h1>{{ $user->name }}'s Latest Threads</h1>
14-
<div class="comments">
15-
@foreach($threads as $thread)
16-
<div class="comment">
17-
<div class="content">
18-
<h2>{{ $thread->title }}</h2>
19-
{{ $thread->bodySummary }}
20-
<ul class="meta">
21-
<li><i class="icon-time"></i> {{ $thread->created_ago }}</li>
22-
<li><a href="{{ $thread->forumThreadUrl }}"><i class="icon-eye"></i> View Thread</a></li>
23-
</ul>
11+
@if($threads->count() > 0)
12+
<div class="half">
13+
<h1>{{ $user->name }}'s Latest Threads</h1>
14+
<div class="comments">
15+
@foreach($threads as $thread)
16+
<div class="comment">
17+
<div class="content">
18+
<h2>{{ $thread->title }}</h2>
19+
{{ $thread->bodySummary }}
20+
<ul class="meta">
21+
<li><i class="icon-time"></i> {{ $thread->created_ago }}</li>
22+
<li><a href="{{ $thread->forumThreadUrl }}"><i class="icon-eye"></i> View Thread</a></li>
23+
</ul>
24+
</div>
2425
</div>
25-
</div>
26-
@endforeach
26+
@endforeach
27+
</div>
2728
</div>
28-
</div>
2929
@endif
3030

31-
@if(count($comments))
32-
<div class="half">
33-
<h1>{{ $user->name }}'s Latest Replies</h1>
34-
<div class="comments">
35-
@foreach($comments as $comment)
36-
<div class="comment">
37-
<div class="content">
31+
@if($comments->count())
32+
<div class="half">
33+
<h1>{{ $user->name }}'s Latest Replies</h1>
34+
<div class="comments">
35+
@foreach($comments as $comment)
36+
<div class="comment">
37+
<div class="content">
3838
<h2>RE: {{ $comment->parent->title }}</h2>
3939
{{ $comment->bodySummary }}
4040
<ul class="meta">
4141
<li><i class="icon-time"></i> {{ $comment->created_ago }}</li>
4242
<li><a href="{{ $comment->commentUrl }}"><i class="icon-eye"></i> View Comment</a></li>
4343
</ul>
44+
</div>
4445
</div>
45-
</div>
46-
@endforeach
46+
@endforeach
47+
</div>
4748
</div>
48-
</div>
4949
@endif
5050

5151

0 commit comments

Comments
 (0)