30 lines
1.2 KiB
PHP
30 lines
1.2 KiB
PHP
@php $item = $forum ?? $thread @endphp
|
|
<div class="row hover align-items-center px-2 py-2 m-0">
|
|
<div class="col-auto">
|
|
<span class="far fa-2x fa-fw fa-folder text-white"></span>
|
|
</div>
|
|
<div class="col">
|
|
<a href="{{ route(isset($forum) ? 'forum' : 'thread', [$item->slug ]) }}" class="d-block h5 mb-0">
|
|
{!! $thread->prefix->display_style ?? '' !!}
|
|
<span class="{{ isset($forum) ? 'forum' : 'thread' }}-title">{{ $item->title }}</span>
|
|
</a>
|
|
@if(isset($forum) && !empty($forum->description))
|
|
<small class="text-muted d-none d-sm-block">{{ $forum->description }}</small>
|
|
@endif
|
|
</div>
|
|
<div class="col-auto text-lg-end d-none d-lg-block">
|
|
@if(!is_null($item->lastpost))
|
|
<small>
|
|
<a href="{{ route('thread', [$item->lastpost->thread->slug ?? $thread->slug]) }}#post-{{ $item->lastpost->id }}" class="font-weight-bold">
|
|
{{ $item->lastpost->title }}
|
|
</a>
|
|
<span class="d-block">
|
|
{{ $item->lastpost->created_at->format($currentUser->profile->dateformat) }} @lang('by') {{ $item->lastpost->createdBy->username }}
|
|
</span>
|
|
</small>
|
|
@else
|
|
—
|
|
@endif
|
|
</div>
|
|
</div>
|