new collapsible text box widget
This commit is contained in:
@@ -10,13 +10,68 @@
|
||||
<div class="row justify-content-center">
|
||||
<h2>{{ $table->title }}</h2>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-md-10">
|
||||
<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>
|
||||
<th>ID</th>
|
||||
@foreach($columns as $col)
|
||||
<th>{{ $col->title }}</th>
|
||||
@endforeach
|
||||
@@ -25,7 +80,6 @@
|
||||
<tbody>
|
||||
@foreach($rows as $row)
|
||||
<tr>
|
||||
<td>#{{ $row->id }}</td>
|
||||
@php($rdata = json_decode($row['data'], true))
|
||||
@foreach($columns as $col)
|
||||
<td data-id="{{ $row->id }}">{{ $rdata[$col->name] }}</td>
|
||||
|
||||
Reference in New Issue
Block a user