@extends('dashboard.core')
@section('dashboard-heading')
@if($export && count($rows) > 0)
@endif
@if($create)
New
@endif
@endsection
@section('dashboard-body')
@if(count($paramdisplay))
@foreach($paramdisplay as $param)
Showing {{ $heading }} with a {{ $param['title'] }} of "{{ $param['value'] }}"
@endforeach
@endif
@if($filter)
@if(!$paginate)
@else
@endif
@endif
@if($paginate && $rows->lastPage() !== 1)
@endif
@if(request()->query('search', null) != null && count($rows) == 0)
No Matching {{ $heading }} Found
@else
@foreach($rows as $row)
-
@if($sortcol != false)
@endif
@foreach($display as $index => $display_column)
@php
$name = null;
$type = null;
foreach ($columns as $column) {
if ($column['name'] == $display_column) {
$name = $column['name'];
$type = $column['type'];
$ext = array_key_exists('ext', $column) ? $column['ext'] : $row::$default_image_ext;
break;
}
}
if ($type == 'image') {
$image = $row->getUploadsPath('image') . $row->id . "-$name.$ext";
$thumbnail = $row->getUploadsPath('thumb') . $row->id . "-$name.$ext";
if (!file_exists(public_path($image))) {
$image = null;
$thumbnail = null;
} else if (!file_exists(public_path($thumbnail))) {
$thumbnail = $image;
}
}
@endphp
@if($name != null && $type != null && ($row[$display_column] != '' || ($type == 'image' && $thumbnail !== null)))
@if($type == 'image')
@else
{{ $row[$display_column] }}
@endif
@if($index < count($display) - 1)
|
@endif
@endif
@endforeach
@endforeach
@endif
@endsection