{{-- resources/views/news/show.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ __('labels.news') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => __('labels.news'), 'actionButton' => [ 'url' => route('news.index', ['type' => 'latest']), 'text' => __('labels.back_to_list'), ], ]) {{-- News Header --}}
{{--

{{ $news->title }}

--}}

{{ $news->title }}

{{-- Quick Actions --}}
@can('update', $news) @endcan @can('delete', $news) @endcan
{{-- METADATA CARDS --}}
{{-- Audience Card --}}
{{ __('labels.audience') }}
{{ $news->audience === 'general' ? __('labels.general') : __('labels.group') }}
{{-- Type Card --}}
{{ __('labels.type') }}
{{ $news->type_label }}
@if($news->category)
{{ __('labels.category') }}
{{ $news->category?->title }} {{-- @if($post->category?->description) {{ Str::limit($post->category?->description, 30, '...') }} @endif --}}
@endif {{-- Status Card --}}
{{ __('labels.status') }}
{{ $news->is_published ? __('labels.published') : __('labels.draft') }}
@if ($news->description)
{{ __('labels.description') }}
{!! nl2br(e($news->description)) !!}
@endif {{-- Attachments Section --}} @isset($news->assets) @include('components.form.file-manager.uploaded-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $news->assets, ]) @endisset {{-- Groups Section --}} {{-- @if ($news->audience === 'group' && $news->groups->count() > 0) @include('components.form.view-selected-groups',[ 'groups' => $news->groups ]) @endif --}} {{-- Comments Section --}}
{{ __('labels.comments') }} {{ $news->comments_count ?? 0 }}
@include('components.comments.index', [ 'comments' => $news->comments, 'commentStates' => \App\Models\Comment::commentStates($news), 'commentableId' => $news->id, 'commentableType' => 'App\Models\News', ])
{{-- Additional Metadata --}} @include('components.meta.stats',[ 'created_at' => $news->created_at ?? null, 'updated_at' => $news->updated_at ?? null, 'published_at' => $news->published_at ?? null, 'is_published' => $news->is_published ?? null, 'assetCounts' => $news->assets->count() ?? null, 'creater' => $news->author_name ?? null, ]) @endsection