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.
106 lines
3.2 KiB
106 lines
3.2 KiB
{{-- User's dashboard / profile page --}}
|
|
@extends('layouts.app')
|
|
|
|
@php
|
|
/** @var \App\Models\Table[] $tables */
|
|
/** @var \App\Models\User $user */
|
|
@endphp
|
|
|
|
@section('content')
|
|
<div class="row justify-content-center">
|
|
|
|
{{-- Dash card --}}
|
|
<div class="col-md-4">
|
|
<div class="card">
|
|
<div class="card-header card-header-extra">
|
|
@icon(fa-user-circle-o fa-pr fa-large)
|
|
<h1>
|
|
@if(authed() && user()->is($user))
|
|
@sr(Your dashboard -)
|
|
@else
|
|
@sr(User's page -)
|
|
@endif
|
|
{{ $user->title }}
|
|
</h1>
|
|
|
|
@if(authed() && user()->is($user))
|
|
<a href="{{route('profile.edit')}}" class="btn ml-auto" aria-label="Edit Profile">Edit</a>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
@if($user->bio)
|
|
@if(mb_strlen($user->bio) > 250)
|
|
<p id="bio-short mb-2" aria-hidden=true>
|
|
@sr(About me:)
|
|
{{mb_substr($user->bio, 0, 250)}}…
|
|
<a class="text-muted small" @tooltip(Show more) href="#" onclick="$('#bio-short').addClass('hidden'); $('#bio-full').removeClass('hidden'); return false;">
|
|
[more]
|
|
</a>
|
|
</p>
|
|
<p id="bio-full" class="hidden mb-2">
|
|
@sr(About me:)
|
|
{{ $user->bio }}
|
|
<a class="text-muted small" @tooltip(Collapse) href="#" onclick="$('#bio-full').addClass('hidden'); $('#bio-short').removeClass('hidden'); return false;">
|
|
[collapse]
|
|
</a>
|
|
</p>
|
|
@else
|
|
<p class="mb-2">
|
|
@sr(About me:)
|
|
{{ $user->bio }}
|
|
</p>
|
|
@endif
|
|
@endif
|
|
|
|
<table>
|
|
<tbody>
|
|
@if($user->website)
|
|
<tr>
|
|
<td class="text-center pr-2">@icon(fa-link, User's Website:)</td>
|
|
<td><a href="{{ $user->website }}">{{ $user->website }}</a></td>
|
|
</tr>
|
|
@endif
|
|
|
|
<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>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="text-center pr-2">@icon(fa-calendar, Join date:)</td>
|
|
<td>Joined {{ $user->created_at->diffForHumans() }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Table list card --}}
|
|
<div class="col-md-8">
|
|
<div class="card">
|
|
<div class="card-header card-header-extra">
|
|
<h2>
|
|
@if(authed() && user()->is($user))
|
|
Your Tables
|
|
@else
|
|
User's Tables
|
|
@endif
|
|
</h2>
|
|
|
|
<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()->is($user))
|
|
<a href="{{route('table.create')}}" class="btn ml-3" aria-label="New Table">New</a>
|
|
@endif
|
|
</div>
|
|
|
|
@include('profile._table-list')
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
@endsection
|
|
|