{{-- resources/views/news/show.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ __('labels.post') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => __('labels.post'), 'actionButton' => [ 'url' => isset($selectedGroupId) ? route('groups.show', ['group' => $selectedGroupId]) : route('posts.index'), 'text' => isset($selectedGroupId) ? __('labels.back_to_group') : __('labels.back_to_posts'), ], ]) {{-- News Header --}}

{{ $post->title }}

{{-- Quick Actions --}}
@can('update', $post) @endcan @can('delete', $post) @endcan
{{-- Type and Category Badges --}} @if($post->type || $post->category)
@if($post->type) {{ __('labels.' . $post->type) }} @endif @if($post->category) {{ $post->category?->title }} @endif
@endif {{-- METADATA CARDS --}}
{{-- Type Card --}} @if($post->type)
{{ __('labels.type') }}
{{ __('labels.' . $post->type) }} {{-- {{ __('labels.' . $post->type . '_desc') }} --}}
@endif {{-- Category Card --}} @if($post->category)
{{ __('labels.category') }}
{{ $post->category?->title }} {{-- @if($post->category?->description) {{ Str::limit($post->category?->description, 30, '...') }} @endif --}}
@endif {{-- Status Card --}}
{{ __('labels.status') }}
{{ $post->is_published ? __('labels.published') : __('labels.draft') }}
@if($post->is_published && $post->published_at) {{ __('labels.since') }} {{ date('d.m.Y H:i', strtotime($post->published_at)) }} @endif
@if ($post->description)
{{ __('labels.description') }}
{!! nl2br(e($post->description)) !!}
@endif @if(isset($selectedUrls) && count($selectedUrls)) @include('components.form.url-links-manage', [ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'urlList' => old('urls', isset($selectedUrls) && count($selectedUrls) ? $selectedUrls : null), ]) @endif {{-- Attachments Section --}} @isset($post->assets) @include('components.form.file-manager.uploaded-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $post->assets, ]) @endisset {{-- Groups Section --}} {{-- @if ($post->groups->count() > 0) @include('components.form.view-selected-groups',[ 'groups' => $post->groups ]) @endif --}} {{-- Comments Section --}}
{{ __('labels.comments') }} {{ $post->comments_count ?? 0 }}
@include('components.comments.index', [ 'comments' => $post->comments, 'commentStates' => \App\Models\Comment::commentStates($post), 'commentableId' => $post->id, 'commentableType' => 'App\Models\Post', ])
@include('components.meta.stats',[ 'created_at' => $post->created_at ?? null, 'updated_at' => $post->updated_at ?? null, 'published_at' => $post->published_at ?? null, 'is_published' => $post->is_published ?? null, 'creater' => $post->author_name ?? null, ]) @endsection