datatable.directory codebase https://datatable.directory/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
datatable.directory/resources/views/welcome.blade.php

86 lines
2.9 KiB

{{-- 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('title', "All Tables")
@section('content')
@if($showGreeter)
@include('_greeter')
@endif
7 years ago
<div class="row justify-content-center">
<div class="col-md-4">
7 years ago
<div class="card">
<div class="card-header card-header-extra">
@icon(fa-users fa-pr fa-large)
<h2>Users</h2>
<nav class="ml-auto" aria-label="Pages of the user list">
{{ $users->links(null, ['ulClass' => 'pagination-sm mb-0 pagination-outline-light']) }}
</nav>
</div>
<div class="list-group list-group-flush">
@if(count($users) == 0)
<span class="list-group-item">No users yet.</span>
@else
@foreach($users as $user)
<a class="list-group-item list-group-item-action" href="{{ route('profile.view', $user->name) }}">
<span class="d-flex">
@icon(fa-user-circle-o fa-pr)
<span class="flex-grow-1">{{ $user->title }}</span>
<span>
{{ $user->tables_count }} table{{$user->tables_count!=1?'s':''}}
</span>
</span>
<small>{{ $user->handle }}</small>
</a>
@endforeach
@endif
</div>
</div>
</div>
<div class="col-md-8 mt-2 mt-md-0">
<div class="card">
<div class="card-header card-header-extra">
@icon(fa-table fa-pr fa-large)
<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'
]) }}
</nav>
@if(authed() && user()->confirmed)
<a href="{{route('table.create')}}" class="btn ml-3" aria-label="New Table">New</a>
@endif
</div>
@include('profile._table-list', ['showAuthors' => true])
</div>
</div>
</div>
@endsection