improve public table listing
This commit is contained in:
@@ -1,21 +1,27 @@
|
||||
@php
|
||||
if (!isset($showAuthors)) $showAuthors = false;
|
||||
@endphp
|
||||
|
||||
<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)
|
||||
@php
|
||||
$forks = $table->forks_count;
|
||||
$faves = $table->favourites_count;
|
||||
$revs = $table->revisions_count;
|
||||
$rows = $table->revision->row_count;
|
||||
$forks = $table->forks_count;
|
||||
$faves = $table->favourites_count;
|
||||
$revs = $table->revisions_count;
|
||||
$rows = $table->revision->row_count;
|
||||
@endphp
|
||||
<a class="list-group-item list-group-item-action"
|
||||
href="{{$table->viewPage}}">
|
||||
<span class="d-block row">{{-- this must be span so that Lynx includes the table name in the anchor --}}
|
||||
<div class="d-inline-block col-7">
|
||||
@icon(fa-table fa-pr){{ $table->title }}
|
||||
</div>{{--
|
||||
--}}<div class="d-inline-block col-5 small text-right">{{--
|
||||
<span class="row">{{-- this must be span so that Lynx includes the table name in the anchor --}}
|
||||
<span class="d-block col-7 flex-grow-1">
|
||||
@icon(fa-table fa-pr){!!
|
||||
$showAuthors ? (e($table->owner->handle) . '<span class="px-1">/</span>') : ''
|
||||
!!}<b>{{ $table->title }}</b>
|
||||
</span>{{--
|
||||
--}}<div class="d-block col-5 small text-right">{{--
|
||||
--}}<span title="Visits" class="d-inline-block" style="min-width: 60px;">
|
||||
{{ $table->visits }}@icon(fa-eye fa-pl, ~Visits~~)
|
||||
</span>{{--
|
||||
@@ -35,12 +41,12 @@
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<div class="d-block small row">
|
||||
<div class="small row">
|
||||
<div class="d-inline-block col-8">
|
||||
@sr(Description:~){{ ellipsis($table->description, 215) }}
|
||||
</div>{{--
|
||||
--}}<div class="d-inline-block col-4 text-right text-muted">
|
||||
Last change {{ $table->updated_at->diffForHumans() }}
|
||||
Last change {{ $table->updated_at->diffForHumans() }}@icon(fa-history fa-pl, sr:Owner)
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<tr>
|
||||
<td class="text-center pr-2">@icon(fa-vcard-o, User's handle:)</td>
|
||||
<td><a href="{{ route('profile.view', $user->name) }}">{{ $user->handle }}</a></td>
|
||||
<td>{{ $user->handle }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user