improve public table listing
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
@guest
|
||||
<p>
|
||||
The table directory is open to anyone, and can be used without login. However,
|
||||
The directory is open to anyone, and can be used without login. However,
|
||||
you will miss out on some features, like the ability to create or edit tables,
|
||||
post comments, or save export presets. You can <a href="/register">register</a> using
|
||||
your e-mail and a password, or through <a href="{{route('oauth-google-authorize')}}">Google</a>,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<small class="flex-grow-1" style="font-size: 120%;">
|
||||
<a href="{{route('profile.view', $table->owner->name)}}" class="link-no-color">{{ $table->owner->handle }}</a>{{--
|
||||
--}}<span class="px-1">/</span>{{--
|
||||
--}}{{ $table->name }}
|
||||
--}}<b>{{ $table->name }}</b>
|
||||
</small>
|
||||
|
||||
<h1 class="mx-3">{{ $table->title }}</h1>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@include('profile._table-list')
|
||||
@include('profile._table-list', ['showAuthors' => true])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user