@extends('voyager::master') @section('page_title', __('voyager::generic.view').' '.$dataType->getTranslatedAttribute('display_name_singular')) @section('page_header')

{{ __('voyager::generic.viewing') }} {{ ucfirst($dataType->getTranslatedAttribute('display_name_singular')) }}   @can('edit', $dataTypeContent) @endcan @can('delete', $dataTypeContent) @if($isSoftDeleted) @else @endif @endcan @can('browse', $dataTypeContent) @endcan

@include('voyager::multilingual.language-selector') @stop @section('content')
@foreach($dataType->readRows as $row) @php if ($dataTypeContent->{$row->field.'_read'}) { $dataTypeContent->{$row->field} = $dataTypeContent->{$row->field.'_read'}; } @endphp

{{ $row->getTranslatedAttribute('display_name') }}

@if (isset($row->details->view)) @include($row->details->view, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $dataTypeContent->{$row->field}, 'action' => 'read', 'view' => 'read', 'options' => $row->details]) @elseif($row->type == "image") @elseif($row->type == 'multiple_images') @if(json_decode($dataTypeContent->{$row->field})) @foreach(json_decode($dataTypeContent->{$row->field}) as $file) @endforeach @else @endif @elseif($row->type == 'relationship') @include('vendor.voyager.bread.relationship', ['view' => 'read', 'options' => $row->details]) @elseif($row->type == 'select_dropdown' && property_exists($row->details, 'options') && !empty($row->details->options->{$dataTypeContent->{$row->field}}) ) @elseif($row->type == 'select_multiple') @if(property_exists($row->details, 'relationship')) @foreach(json_decode($dataTypeContent->{$row->field}) as $item) {{ $item->{$row->field} }} @endforeach @elseif(property_exists($row->details, 'options')) @if (!empty(json_decode($dataTypeContent->{$row->field}))) @foreach(json_decode($dataTypeContent->{$row->field}) as $item) @if (@$row->details->options->{$item}) {{ $row->details->options->{$item} . (!$loop->last ? ', ' : '') }} @endif @endforeach @else {{ __('voyager::generic.none') }} @endif @endif @elseif($row->type == 'date' || $row->type == 'timestamp') @if ( property_exists($row->details, 'format') && !is_null($dataTypeContent->{$row->field}) ) {{ \Carbon\Carbon::parse($dataTypeContent->{$row->field})->formatLocalized($row->details->format) }} @else {{ $dataTypeContent->{$row->field} }} @endif @elseif($row->type == 'checkbox') @if(property_exists($row->details, 'on') && property_exists($row->details, 'off')) @if($dataTypeContent->{$row->field}) {{ $row->details->on }} @else {{ $row->details->off }} @endif @else {{ $dataTypeContent->{$row->field} }} @endif @elseif($row->type == 'color') {{ $dataTypeContent->{$row->field} }} @elseif($row->type == 'coordinates') @include('voyager::partials.coordinates') @elseif($row->type == 'rich_text_box') @include('voyager::multilingual.input-hidden-bread-read') {!! $dataTypeContent->{$row->field} !!} @elseif($row->type == 'file') @if(json_decode($dataTypeContent->{$row->field})) @foreach(json_decode($dataTypeContent->{$row->field}) as $file) {{ $file->original_name ?: '' }}
@endforeach @else {{ __('voyager::generic.download') }} @endif @else @include('voyager::multilingual.input-hidden-bread-read')

{{ $dataTypeContent->{$row->field} }}

@endif
@if(!$loop->last)
@endif @endforeach
{{-- Single delete modal --}} @stop @section('javascript') @if ($isModelTranslatable) @endif @stop