add different table sort options, change default to last-updated
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
{{-- Public landing page --}}
|
||||
|
||||
@php
|
||||
/** @var \App\Models\User[]|\Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator $users */
|
||||
/** @var \App\Models\Table[]|\Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator $tables */
|
||||
@endphp
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@@ -44,10 +49,27 @@
|
||||
<div class="card">
|
||||
<div class="card-header card-header-extra">
|
||||
@icon(fa-table fa-pr fa-large)
|
||||
<h2>Popular Tables</h2>
|
||||
<h2>Tables:</h2>
|
||||
<span>
|
||||
<a class="nav-link dropdown-toggle link-no-color pl-1 ml-1 pr-2"
|
||||
data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
|
||||
aria-expanded="false">{{ $sortOptions[$tableSort] }}</a>
|
||||
<div class="dropdown-menu">
|
||||
@foreach($sortOptions as $k => $label)
|
||||
{{--@if($k != $tableSort)--}}
|
||||
<a class="dropdown-item"
|
||||
href="{{ route('dash', Input::except(['tableSort', 'tablePage']) + ['tableSort' => $k]) }}">
|
||||
{{ $label }}
|
||||
</a>
|
||||
{{--@endif--}}
|
||||
@endforeach
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<nav class="ml-auto" aria-label="Pages of the table list">
|
||||
{{ $tables->links(null, ['ulClass' => 'pagination-sm mb-0 pagination-outline-light']) }}
|
||||
{{ $tables->links(null, [
|
||||
'ulClass' => 'pagination-sm mb-0 pagination-outline-light'
|
||||
]) }}
|
||||
</nav>
|
||||
|
||||
@if(authed() && user()->confirmed)
|
||||
|
||||
Reference in New Issue
Block a user