@extends('voyager::master') @section('page_title', __('voyager::generic.viewing').' '.$dataType->display_name_plural) @section('page_header')

{{ $dataType->display_name_plural }}

Total: {{ $dataTypeContent->count() }}
@can('add',app($dataType->model_name))
{{ __('voyager::generic.add_new') }}
@endcan
@stop @section('content')
@include('voyager::alerts') @if (!$isServerSide) @yield('search_bar',View::make('elements.search_bar')) @endif @if ($isServerSide) @if($dataType->slug == 'products' || $dataType->slug == 'brochures' || $dataType->slug == 'users')
@if(!empty($elements)) @foreach($elements as $e) {!! $e !!} @endforeach
@endif
@else @endif @endif
@can('delete',app($dataType->model_name)) @endcan @foreach($dataType->browseRows as $row) @endforeach @foreach($dataTypeContent as $data) @can('delete',app($dataType->model_name)) @endcan @foreach($dataType->browseRows as $row) @endforeach @endforeach
@if ($isServerSide) @endif {{ $row->display_name }} @if ($isServerSide) @if ($row->isCurrentSortField()) @if (!isset($_GET['sort_order']) || $_GET['sort_order'] == 'asc') @else @endif @endif @endif {{ __('voyager::generic.actions') }}
@if($row->type == 'image') @elseif($row->type == 'relationship') @include('voyager::formfields.relationship', ['view' => 'browse', 'show_count' => isset($show_count)?$show_count:null ]) @elseif($row->type == 'select_multiple') @if(property_exists($options, 'relationship')) @foreach($data->{$row->field} as $item) @if($item->{$row->field . '_page_slug'}) {{ $item->{$row->field} }}@if(!$loop->last), @endif @else {{ $item->{$row->field} }} @endif @endforeach @elseif(property_exists($options, 'options')) @if(is_array($data->{$row->field})) @foreach($data->{$row->field} as $item) {{ $options->options->{$item} . (!$loop->last ? ', ' : '') }} @endforeach @else @foreach(json_decode($data->{$row->field}) as $item) {{ $options->options->{$item} . (!$loop->last ? ', ' : '') }} @endforeach @endif @endif @elseif($row->type == 'select_dropdown' && property_exists($options, 'options')) @if($data->{$row->field . '_page_slug'}) {!! $options->options->{$data->{$row->field}} !!} @else {!! $options->options->{$data->{$row->field}} or '' !!} @endif @elseif($row->type == 'select_dropdown' && $data->{$row->field . '_page_slug'}) {{ $data->{$row->field} }} @elseif($row->type == 'date' || $row->type == 'timestamp') {{ $options && property_exists($options, 'format') ? \Carbon\Carbon::parse($data->{$row->field})->formatLocalized($options->format) : $data->{$row->field} }} @elseif($row->type == 'checkbox') @if($options && property_exists($options, 'on') && property_exists($options, 'off')) @if($data->{$row->field}) {{ $options->on }} @else {{ $options->off }} @endif @else {{ $data->{$row->field} }} @endif @elseif($row->type == 'color') {{ $data->{$row->field} }} @elseif($row->type == 'text') @include('voyager::multilingual.input-hidden-bread-browse')
{{ mb_strlen( $data->{$row->field} ) > 200 ? mb_substr($data->{$row->field}, 0, 200) . ' ...' : $data->{$row->field} }}
@elseif($row->type == 'text_area') @include('voyager::multilingual.input-hidden-bread-browse')
{{ mb_strlen( $data->{$row->field} ) > 200 ? mb_substr($data->{$row->field}, 0, 200) . ' ...' : $data->{$row->field} }}
@elseif($row->type == 'file' && !empty($data->{$row->field}) ) @include('voyager::multilingual.input-hidden-bread-browse') @if(json_decode($data->{$row->field})) @foreach(json_decode($data->{$row->field}) as $file) {{ $file->original_name ?: '' }}
@endforeach @endif @elseif($row->type == 'rich_text_box') @include('voyager::multilingual.input-hidden-bread-browse')
{{ mb_strlen( strip_tags($data->{$row->field}, '') ) > 200 ? mb_substr(strip_tags($data->{$row->field}, ''), 0, 200) . ' ...' : strip_tags($data->{$row->field}, '') }}
@elseif($row->type == 'coordinates') @include('voyager::partials.coordinates-static-image') @elseif($row->type == 'multiple_images') @php $images = json_decode($data->{$row->field}); @endphp @if($images) @php $images = array_slice($images, 0, 3); @endphp @foreach($images as $image) @endforeach @endif @else @include('voyager::multilingual.input-hidden-bread-browse') {{ $data->{$row->field} }} @endif
@foreach(Voyager::actions() as $action) @include('voyager::bread.partials.actions', ['action' => $action]) @endforeach
@if ($isServerSide)
{{ trans_choice( 'voyager::generic.showing_entries', $dataTypeContent->total(), [ 'from' => $dataTypeContent->firstItem(), 'to' => $dataTypeContent->lastItem(), 'all' => $dataTypeContent->total() ]) }}
@if($dataType->slug == 'products' || $dataType->slug == 'brochures') {{ $dataTypeContent->appends([ 's' => $search->value, 'order_by' => $orderBy, 'filter_per_page' => $search->paging, 'filter_supplier' => $search->supplier, 'filter_category' => $search->category, 'sort_order' => $sortOrder ])->links() }} @elseif($dataType->slug == 'users') {{ $dataTypeContent->appends([ 's' => $search->value, 'order_by' => $orderBy, 'filter_per_page' => $search->paging, 'filter_state' => $search->state, 'sort_order' => $sortOrder ])->links() }} @else {{ $dataTypeContent->appends([ 's' => $search->value, 'order_by' => $orderBy, 'filter' => $search->filter, 'key' => $search->key, 'sort_order' => $sortOrder ])->links() }} @endif
@endif
@can('edit',app($dataType->model_name)) @include('elements.bulk_edit') @endcan @can('edit',app($dataType->model_name)) @if(isset($dataType->order_column) && isset($dataType->order_display_column)) {{ __('voyager::bread.order') }} @endif @endcan @include('voyager::multilingual.language-selector')
{{-- Single delete modal --}} @stop @section('css') @if(!$dataType->server_side && config('dashboard.data_tables.responsive')) @endif @stop @section('javascript') @if(!$dataType->server_side && config('dashboard.data_tables.responsive')) @endif