@extends ('forum.master', ['thread' => null, 'breadcrumbs_append' => [$thread->title], 'thread_title' => $thread->title]) @section ('content')

{{ $thread->title }}

@if (Gate::allows('deleteThreads', $thread->category) && Gate::allows('delete', $thread)) @if ($thread->trashed()) {{ trans('forum::general.perma_delete') }} @else {{ trans('forum::general.delete') }} @endif @endif @if ($thread->trashed() && Gate::allows('restoreThreads', $thread->category) && Gate::allows('restore', $thread)) {{ trans('forum::general.restore') }} @endif @if (Gate::allows('lockThreads', $category) || Gate::allows('pinThreads', $category) || Gate::allows('rename', $thread) || Gate::allows('moveThreadsFrom', $category))
@if (! $thread->trashed()) @can ('lockThreads', $category) @if ($thread->locked) {{ trans('forum::threads.unlock') }} @else {{ trans('forum::threads.lock') }} @endif @endcan @can ('pinThreads', $category) @if ($thread->pinned) {{ trans('forum::threads.unpin') }} @else {{ trans('forum::threads.pin') }} @endif @endcan @can ('rename', $thread) {{ trans('forum::general.rename') }} @endcan @can ('moveThreadsFrom', $category) {{ trans('forum::general.move') }} @endcan @endif
@endcan
@if ($thread->trashed()) {{ trans('forum::general.deleted') }} @endif @if ($thread->pinned) {{ trans('forum::threads.pinned') }} @endif @if ($thread->locked) {{ trans('forum::threads.locked') }} @endif

@if ((count($posts) > 1 || $posts->currentPage() > 1) && (Gate::allows('deletePosts', $thread) || Gate::allows('restorePosts', $thread)) && count($selectablePosts) > 0)
@csrf @endif
{{ $posts->links('forum.pagination') }}
@if (! $thread->trashed()) @can ('reply', $thread) @endcan @endif
@if ((count($posts) > 1 || $posts->currentPage() > 1) && (Gate::allows('deletePosts', $thread) || Gate::allows('restorePosts', $thread)) && count($selectablePosts) > 0)
@endif @foreach ($posts as $post) @include ('forum.post.partials.list', compact('post')) @endforeach @if ((count($posts) > 1 || $posts->currentPage() > 1) && (Gate::allows('deletePosts', $thread) || Gate::allows('restorePosts', $thread)) && count($selectablePosts) > 0)
{{ trans('forum::general.with_selection') }}
@if (config('forum.general.soft_deletes'))
@endif
@endif {{ $posts->links('forum.pagination') }} @if (! $thread->trashed()) @can ('reply', $thread)

{{ trans('forum::general.quick_reply') }}

@csrf
@endcan @endif
@if ($thread->trashed() && Gate::allows('restoreThreads', $thread->category) && Gate::allows('restore', $thread)) @component('forum.modal-form') @slot('key', 'restore-thread') @slot('title', '' . trans('forum::general.restore')) @slot('route', Forum::route('thread.restore', $thread)) @slot('method', 'POST') {{ trans('forum::general.generic_confirm') }} @slot('actions') @endslot @endcomponent @endif @if (Gate::allows('deleteThreads', $thread->category) && Gate::allows('delete', $thread)) @component('forum.modal-form') @slot('key', 'delete-thread') @slot('title', '' . trans('forum::threads.delete')) @slot('route', Forum::route('thread.delete', $thread)) @slot('method', 'DELETE') @if (config('forum.general.soft_deletes'))
@else {{ trans('forum::general.generic_confirm') }} @endif @slot('actions') @endslot @endcomponent @if (config('forum.general.soft_deletes')) @component('forum.modal-form') @slot('key', 'perma-delete-thread') @slot('title', '' . trans_choice('forum::threads.perma_delete', 1)) @slot('route', Forum::route('thread.delete', $thread)) @slot('method', 'DELETE') {{ trans('forum::general.generic_confirm') }} @slot('actions') @endslot @endcomponent @endif @endif @if (! $thread->trashed()) @can ('lockThreads', $category) @if ($thread->locked) @component('forum.modal-form') @slot('key', 'unlock-thread') @slot('title', ' ' . trans('forum::threads.unlock')) @slot('route', Forum::route('thread.unlock', $thread)) @slot('method', 'POST') {{ trans('forum::general.generic_confirm') }} @slot('actions') @endslot @endcomponent @else @component('forum.modal-form') @slot('key', 'lock-thread') @slot('title', ' ' . trans('forum::threads.lock')) @slot('route', Forum::route('thread.lock', $thread)) @slot('method', 'POST') {{ trans('forum::general.generic_confirm') }} @slot('actions') @endslot @endcomponent @endif @endcan @can ('pinThreads', $category) @if ($thread->pinned) @component('forum.modal-form') @slot('key', 'unpin-thread') @slot('title', ' ' . trans('forum::threads.unpin')) @slot('route', Forum::route('thread.unpin', $thread)) @slot('method', 'POST') {{ trans('forum::general.generic_confirm') }} @slot('actions') @endslot @endcomponent @else @component('forum.modal-form') @slot('key', 'pin-thread') @slot('title', ' ' . trans('forum::threads.pin')) @slot('route', Forum::route('thread.pin', $thread)) @slot('method', 'POST') {{ trans('forum::general.generic_confirm') }} @slot('actions') @endslot @endcomponent @endif @endcan @can ('rename', $thread) @component('forum.modal-form') @slot('key', 'rename-thread') @slot('title', ' ' . trans('forum::general.rename')) @slot('route', Forum::route('thread.rename', $thread)) @slot('method', 'POST')
@slot('actions') @endslot @endcomponent @endcan @can ('moveThreadsFrom', $category) @component('forum.modal-form') @slot('key', 'move-thread') @slot('title', ' ' . trans('forum::general.move')) @slot('route', Forum::route('thread.move', $thread)) @slot('method', 'POST')
@slot('actions') @endslot @endcomponent @endcan @endif @stop