Skip to content

Commit 4e42dae

Browse files
committed
Move to re-usable partial
1 parent d7f59ab commit 4e42dae

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

resources/views/forum/overview.blade.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,7 @@
5353
@include('forum.threads.info.tags')
5454
</div>
5555

56-
@if ($thread->isSolved())
57-
<a class="label label-primary text-center mt-4 md:mt-0"
58-
href="{{ route('thread', $thread->slug()) }}#{{ $thread->solutionReplyRelation->id }}">
59-
<i class="fa fa-check mr-2"></i>
60-
View solution
61-
</a>
62-
@endif
63-
56+
@include('forum.threads._view_solution')
6457
</div>
6558
</div>
6659
@endforeach
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@if ($thread->isSolved())
2+
<a class="label label-primary text-center mt-4 md:mt-0"
3+
href="{{ route('thread', $thread->slug()) }}#{{ $thread->solution_reply_id }}">
4+
<i class="fa fa-check mr-2"></i>
5+
View solution
6+
</a>
7+
@endif
8+

resources/views/forum/threads/show.blade.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,7 @@ class="text-green-darker mr-2">
2828
</div>
2929
</div>
3030

31-
@if ($thread->isSolved())
32-
<div class="label label-primary">
33-
<a href="#{{ $thread->solution_reply_id }}">
34-
View Solution
35-
</a>
36-
</div>
37-
@endif
31+
@include('forum.threads._view_solution')
3832
</div>
3933

4034
@include('forum.threads.info.tags')

0 commit comments

Comments
 (0)