@extends('web.default.layouts.app') @section('content')

{{ $forum->title }}

{{ $forum->description }}

{{ trans('update.topics_in_this_forum',['count' => $topics->count()]) }}

@if($forum->close) @else {{ trans('update.create_a_new_topic') }} @endif
@if($forum->checkUserCanCreateTopic()) @if(!empty($topics) and count($topics))
@foreach($topics as $topic)
{{ $topic->creator->full_name }}

{{ $topic->title }}

{{ trans('public.by') }} {{ $topic->creator->full_name }} {{ trans('public.in') }} {{ dateTimeFormat($topic->created_at,'j M Y | H:i') }}
{{ $topic->posts_count }} {{ trans('site.posts') }}
@if($topic->pin)
@endif @if($topic->close)
@endif
@if(!empty($topic->lastPost))
{{ $topic->lastPost->user->full_name }}

{{ $topic->lastPost->user->full_name }}

{{ trans('public.in') }} {{ dateTimeFormat($topic->lastPost->created_at,'j M Y | H:i') }}
@endif
@endforeach
{{ $topics->appends(request()->input())->links('vendor.pagination.panel') }}
@else

{{ trans('update.result_not_found') }}

{{ trans('update.try_another_word_to_reach_results') }}

@endif @else

{{ trans('update.result_not_found') }}

{{ trans('update.you_not_access_to_this_forum') }}

@endif
@if(!empty($topUsers) and count($topUsers))

{{ trans('update.top_users') }}

@foreach($topUsers as $topUser) @if(!empty($topUser->all_posts))
{{ $topUser->full_name }}
{{ $topUser->full_name }} {{ trans('update.n_posts',['count' => $topUser->posts]) }} | {{ trans('update.n_topics',['count' => $topUser->topics]) }}
@endif @endforeach
@endif @if(!empty($popularTopics) and count($popularTopics))

{{ trans('update.popular_topics') }}

@foreach($popularTopics as $popularTopic)
{{ !empty($popularTopic->creator) ? $popularTopic->creator->full_name : '' }}
{{ $popularTopic->title }} {{ trans('public.by') }} {{ $popularTopic->creator->full_name }} | {{ trans('update.n_posts',['count' => $popularTopic->posts_count]) }}
@endforeach
@endif
@endsection