Skip to content

Commit cced887

Browse files
committed
Merge branch 'scroll-to-solution'
2 parents fba839a + 4e42dae commit cced887

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
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: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@
1616
<div class="w-full md:w-3/4 md:pr-3">
1717
<div class="reply bg-white border rounded">
1818
<div class="flex flex-col md:flex-row md:items-center text-sm p-4 border-b">
19-
<div class="flex mb-4 md:mb-0">
20-
@include('forum.threads.info.avatar', ['user' => $thread->author()])
21-
22-
<div class="mr-6 text-gray-700">
23-
<a href="{{ route('profile', $thread->author()->username()) }}" class="text-green-darker mr-2">{{ $thread->author()->name() }}</a> posted
24-
{{ $thread->createdAt()->diffForHumans() }}
19+
<div class="flex flex-wrap mb-4 md:mb-0 justify-between w-full items-center">
20+
<div class="flex">
21+
@include('forum.threads.info.avatar', ['user' => $thread->author()])
22+
23+
<div class="mr-6 mb-4 md:mb-0 text-gray-700">
24+
<a href="{{ route('profile', $thread->author()->username()) }}"
25+
class="text-green-darker mr-2">
26+
{{ $thread->author()->name() }}
27+
</a> posted {{ $thread->createdAt()->diffForHumans() }}
28+
</div>
2529
</div>
30+
31+
@include('forum.threads._view_solution')
2632
</div>
2733

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

0 commit comments

Comments
 (0)