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.
93 lines
2.3 KiB
93 lines
2.3 KiB
{{-- Basic table view --}}
|
|
|
|
@extends('layouts.app')
|
|
|
|
@php
|
|
/** @var \App\Models\Table $table */
|
|
@endphp
|
|
|
|
@section('content')
|
|
<div class="row justify-content-center">
|
|
<h2>{{ $table->title }}</h2>
|
|
</div>
|
|
|
|
<div class="row mx-auto col-md-12 justify-content-center mb-1 border rounded px-0 py-2 box-shadow mb-3">
|
|
<div class="col-md-6">
|
|
@if($table->description)
|
|
<p class="last-p-mb-0">
|
|
<b>Description</b><br>
|
|
{!! Widget::collapsible($table->description, 400, '8em') !!}
|
|
</p>
|
|
@endif
|
|
|
|
@if($table->origin)
|
|
<p class="last-p-mb-0">
|
|
<b>Source</b><br>
|
|
{{ $table->origin }}
|
|
</p>
|
|
@endif
|
|
</div>
|
|
<div class="col-md-4 border-left">
|
|
<table>
|
|
<tbody>
|
|
|
|
<tr>
|
|
<th class="text-right pr-2">License</th>
|
|
<td>{{ $table->license ?: 'CC0' }}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="text-right pr-2">Created</th>
|
|
<td>{{ $table->created_at->format("M j, Y") }}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="text-right pr-2">Updated</th>
|
|
<td>{{ $table->updated_at->format("M j, Y") }}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="text-right pr-2">Revisions</th>
|
|
<td>{{ $table->revisions()->count() }}</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col-md-2 border-left">
|
|
Right Column with buttons etc, maybe
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row justify-content-center mb-2">
|
|
<div class="col-md-12 d-flex">
|
|
<nav class="text-center ml-auto" aria-label="Pages of the table">
|
|
{{ $rows->links(null, ['ulClass' => 'mb-0']) }}
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row justify-content-center">
|
|
<div class="col-12">
|
|
<table class="table table-hover table-sm">
|
|
<thead>
|
|
<tr>
|
|
@foreach($columns as $col)
|
|
<th>{{ $col->title }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($rows as $row)
|
|
<tr>
|
|
@php($rdata = json_decode($row['data'], true))
|
|
@foreach($columns as $col)
|
|
<td data-id="{{ $row->id }}">{{ $rdata[$col->name] }}</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|