wip content index
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
@php
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="table mt-5 ">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@if($isWritable)
|
||||
<th>
|
||||
<x-lucent::checkbox value=""></x-lucent::checkbox>
|
||||
</th>
|
||||
@endif
|
||||
@foreach($schema->visible as $visibleColumn)
|
||||
@php
|
||||
$schemaField = $schema->fields->firstWhere("name", $visibleColumn);
|
||||
if(empty($schemaField)){
|
||||
$schemaField = collect($systemFields)->firstWhere("name", str_replace("_sys.", "",$visibleColumn) );
|
||||
}
|
||||
@endphp
|
||||
<th
|
||||
class="field-ui-{{$schemaField->info->name ?? $schemaField->ui}} {{$schemaField->name === $sortField->name ? "is-sort" : ""}}"
|
||||
scope="col"
|
||||
title={{$schemaField->help ?? ""}}
|
||||
>{{$schemaField->label}}</th
|
||||
>
|
||||
@endforeach
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($records as $record)
|
||||
<tr>
|
||||
<td class="title-td">
|
||||
<div
|
||||
class="title-td-contents"
|
||||
>
|
||||
@if($isWritable)
|
||||
<x-lucent::checkbox :value="$record->id"></x-lucent::checkbox>
|
||||
|
||||
@endif
|
||||
@if($record->_file?->path)
|
||||
<div class="file-table-row">
|
||||
@include("lucent::records-editor.fields.file.thumb", ["size" => "small"])
|
||||
<div>
|
||||
@if($record->status === "draft")
|
||||
<span style="text-transform: uppercase;font-size:10px">{{$record->status}}</span>
|
||||
@endif
|
||||
<a
|
||||
href="{{lucent_url("records")}}/{{$record->id}}"
|
||||
target={{$inModal ? "_blank" : "_self"}}
|
||||
>
|
||||
{{ $viewModel->getRecordName($record)}}
|
||||
</a>
|
||||
<span>{{ (int)($record->_file->size / 1024) }}kB</span>
|
||||
|
||||
@if($record->_file->width > 0)
|
||||
<span>{{$record->_file->width . "x" . $record->_file->height}}</span>
|
||||
@endif
|
||||
<a
|
||||
href="{{lucent_file($record)}}"
|
||||
target="_blank"
|
||||
>
|
||||
Download
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@else
|
||||
<a
|
||||
href="{{lucent_url("records")}}/{{$record->id}}"
|
||||
target={{$inModal ? "_blank" : "_self"}}
|
||||
>
|
||||
@if($record->status === "draft")
|
||||
<span style="text-transform: uppercase;font-size:10px">{{$record->status}}</span>
|
||||
@endif
|
||||
{{$viewModel->getRecordName($record)}}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
@include("lucent::records.row")
|
||||
<td>
|
||||
<x-lucent::avatar side="24"
|
||||
:user="$users->firstWhere('id',$record->_sys->createdBy)"></x-lucent::avatar>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user