datatable.directory codebase
https://datatable.directory/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
@php
|
|
$tab = 'edit-rows';
|
|
/** @var \App\Tables\Column[] $columns */
|
|
/** @var \App\Tables\Changeset $changeset */
|
|
/** @var \App\Models\Row[]|Illuminate\Pagination\Paginator $rows */
|
|
/** @var \App\Models\Table $table */
|
|
@endphp
|
|
|
|
@extends('table.propose.layout')
|
|
|
|
@section('tab-content')
|
|
|
|
@if($rows->hasPages())
|
|
<div class="col-md-12 d-flex">
|
|
<nav class="text-center" aria-label="Pages of the table">
|
|
{{ $rows->links(null, ['ulClass' => 'mb-0']) }}
|
|
</nav>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="col-12">
|
|
@php
|
|
$transformed = $rows->keyBy('_id')->map(function($r) use ($changeset) {
|
|
/** @var \App\Tables\Changeset $changeset */
|
|
return $changeset->transformRow($r, true);
|
|
});
|
|
@endphp
|
|
|
|
<table is="row-editor"
|
|
route="{{$table->getDraftRoute('update')}}"
|
|
:columns="{{toJSON($columns)}}"
|
|
:x-rows="{{toJSON($transformed)}}">
|
|
</table>
|
|
</div>
|
|
|
|
@if($rows->hasPages())
|
|
<div class="col-md-12 d-flex">
|
|
<nav class="text-center" aria-label="Pages of the table">
|
|
{{ $rows->links(null, ['ulClass' => 'mb-0']) }}
|
|
</nav>
|
|
</div>
|
|
@endif
|
|
@stop
|
|
|