instancecache trait

This commit is contained in:
2018-07-22 16:07:27 +02:00
parent a3ba68ea98
commit 3b123d7f08
5 changed files with 75 additions and 30 deletions
@@ -0,0 +1,29 @@
<div class="list-group list-group-flush">
@if(count($tables) == 0)
<span class="list-group-item">No tables yet.</span>
@else
@foreach($tables as $table)
<a class="list-group-item list-group-item-action"
href="{{route('table.view', ['user' => $table->cachedOwner()->name, 'table' => $table->name])}}">
<span class="d-block row">
<span class="d-inline-block col-10">
<i class="fa-table fa-pr"></i>{{ $table->title }}
</span>{{--
--}}<span class="d-inline-block col-2 small text-right">
{{ $table->revision->row_count }} rows
</span>
</span>
<span class="d-block small row">
<span class="d-inline-block col-8">
{{ ellipsis($table->description, 215) }}
</span>{{--
--}}<span class="d-inline-block col-4 text-right text-muted">
Last change {{ $table->updated_at->diffForHumans() }}
</span>
</span>
</a>
@endforeach
{{ $tables->links() }}
@endif
</div>
+1 -30
View File
@@ -65,7 +65,6 @@
</div>
</div>
</div>
{{-- Table list card --}}
<div class="col-md-8">
<div class="card">
@@ -83,35 +82,7 @@
@endif
</div>
<div class="list-group list-group-flush">
@if(count($tables) == 0)
<span class="list-group-item">No tables yet.</span>
@else
@foreach($tables as $table)
<a class="list-group-item list-group-item-action"
href="{{route('table.view', ['user' => $user->name, 'table' => $table->name])}}">
<span class="d-block row">
<span class="d-inline-block col-10">
<i class="fa-table fa-pr"></i>{{ $table->title }}
</span>{{--
--}}<span class="d-inline-block col-2 small text-right">
{{ $table->revision->row_count }} rows
</span>
</span>
<span class="d-block small row">
<span class="d-inline-block col-8">
{{ ellipsis($table->description, 215) }}
</span>{{--
--}}<span class="d-inline-block col-4 text-right text-muted">
Last change {{ $table->updated_at->diffForHumans() }}
</span>
</span>
</a>
@endforeach
{{ $tables->links() }}
@endif
</div>
@include('user._table-list')
</div>
</div>