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

{{ $safetyInformation->title }}

--}}

{{ $safetyInformation->title }}

{{-- Quick Actions --}}
@can('update', $safetyInformation) @endcan @can('delete', $safetyInformation) @endcan
{{-- METADATA CARDS --}}
{{-- Audience Card --}}
{{ __('labels.audience') }}
{{ $safetyInformation->audience === 'general' ? __('labels.general') : __('labels.group') }}
@if ($safetyInformation->category)
{{ __('labels.category') }}
{{ $safetyInformation->category?->title }} {{-- @if ($post->category?->description) {{ Str::limit($post->category?->description, 30, '...') }} @endif --}}
@endif {{-- Status Card --}}
{{ __('labels.status') }}
{{ $safetyInformation->is_published ? __('labels.published') : __('labels.draft') }}
@if ($safetyInformation->description)
{{ __('labels.description') }}
{!! nl2br(e($safetyInformation->description)) !!}
@endif {{-- Attachments Section --}} @isset($safetyInformation->assets) @include('components.form.file-manager.uploaded-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $safetyInformation->assets, ]) @endisset {{-- Groups Section --}} {{-- @if ($safetyInformation->audience === 'group' && $safetyInformation->groups->count() > 0) @include('components.form.view-selected-groups',[ 'groups' => $safetyInformation->groups ]) @endif --}} {{-- Comments Section --}} @if (isset($safetyInformation)) @include('components.comments.index', [ 'commentsCount' => $safetyInformation->comments()->approved()->count(), 'comments' => $safetyInformation->comments ?? null, 'commentableId' => $safetyInformation->id ?? null, 'commentableType' => 'App\Models\SafetyInformation', 'loadCommentsUrl' => route('comments.index', [ 'commentableType' => 'safety_information', 'commentableId' => $safetyInformation->id, ]), 'isDisabled' => $safetyInformation->is_locked || $safetyInformation->trashed(), 'isMarkAsAnswerDisabled' => true, 'isChangeStatusDisabled' => false, 'isVotingDisabled' => true, ]) @endif {{-- Additional Metadata --}} @include('components.meta.stats', [ 'created_at' => $safetyInformation->created_at ?? null, 'updated_at' => $safetyInformation->updated_at ?? null, 'published_at' => $safetyInformation->published_at ?? null, 'is_published' => $safetyInformation->is_published ?? null, 'assetCounts' => $safetyInformation->assets->count() ?? null, 'creater' => $safetyInformation->author_name ?? null, ]) @endsection