@php $cardUser = !empty($post) ? $post->user : $topic->creator; $cardUserBadges = $cardUser->getBadges(); @endphp
@if(!empty($post) and $post->pin)
@endif
{{-- Avatar --}}
{{ $cardUser->full_name }}

{{ $cardUser->full_name }}

@if($cardUser->isUser()) {{ trans('quiz.student') }} @elseif($cardUser->isTeacher()) {{ trans('public.instructor') }} @elseif($cardUser->isOrganization()) {{ trans('home.organization') }} @elseif($cardUser->isAdmin()) {{ trans('panel.staff') }} @endif
@if(!empty($cardUserBadges) and count($cardUserBadges))
@foreach($cardUserBadges as $badge)
{{ !empty($badge->badge_id) ? $badge->badge->title : $badge->title }}
@endforeach
@endif
@if($cardUser->getTopicsPostsCount() > 0)
{{ trans('site.posts') }}: {{ $cardUser->getTopicsPostsCount() }}
@endif @if($cardUser->getTopicsPostsLikesCount() > 0)
{{ trans('update.likes') }}: {{ $cardUser->getTopicsPostsLikesCount() }}
@endif @if(count($cardUser->followers()))
{{ trans('panel.followers') }}: {{ count($cardUser->followers()) }}
@endif
{{ trans('update.member_since') }}: {{ dateTimeFormat($cardUser->created_at,'j M Y') }}
@if(!empty($cardUser->getCountryAndState()))
{{ trans('update.location') }}: {{ $cardUser->getCountryAndState() }}
@endif
@if(!empty($post) and !empty($post->parent))
{{ trans('update.reply_to') }} {{ $post->parent->user->full_name }}
{!! truncate($post->parent->description, 200) !!}
@endif {{-- Post Description --}}
{!! !empty($post) ? $post->description : $topic->description !!}
{{-- Attachments --}} @if(!empty($post) and !empty($post->attach)) @elseif(empty($post) and !empty($topic->attachments) and count($topic->attachments))
@foreach($topic->attachments as $attachment) {{ truncate($attachment->getName(), 24) }} @endforeach
@endif
{{ dateTimeFormat(!empty($post) ? $post->created_at : $topic->created_at,'j M Y | H:i') }}
@if(!empty($authUser) and !$topic->close) {{-- Replay --}} @if(!empty($post)) @endif {{-- Pin & Unpin --}} @if(!empty($post) and $authUser->id == $topic->creator_id) @endif {{-- Edit --}} @if($authUser->id == $cardUser->id) @if(!empty($post)) @else @endif @endif {{-- Report --}} @endif @php $isLiked = ((!empty($post) and in_array($post->id, $likedPostsIds)) or (empty($post) and $topic->liked)); @endphp {{-- Likes --}}
{{ !empty($post) ? $post->likes->count() : $topic->likes->count() }} {{ trans('update.likes') }}