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/profile/view.blade.php

100 lines
2.9 KiB

{{-- User's dashboard / profile page --}}
@extends('layouts.app')
@php
/** @var \App\Models\Table[] $tables */
/** @var \App\Models\User $user */
@endphp
@section('content')
7 years ago
<div class="row justify-content-center">
7 years ago
{{-- Dash card --}}
<div class="col-md-4">
<div class="card">
<div class="card-header card-header-extra">
7 years ago
@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>
7 years ago
@if(authed() && user()->is($user))
7 years ago
<a href="{{route('profile.edit')}}" class="btn ml-auto" aria-label="Edit Profile">Edit</a>
7 years ago
@endif
</div>
7 years ago
<div class="card-body">
@if($user->bio)
<div class="mb-3">
{!! Widget::collapsible($user->bio, 350, '8em')->srPrefix('About me:') !!}
</div>
7 years ago
@endif
<table class="bio-table">
7 years ago
<tbody>
@if($user->website)
<tr>
<td class="text-center pr-2">@icon(fa-link, User's Website:)</td>
<td>{!! Widget::tryLink($user->website) !!}</td>
7 years ago
</tr>
@endif
<tr>
<td class="text-center pr-2">@icon(fa-vcard-o, User's handle:)</td>
<td>{{ $user->handle }}</td>
7 years ago
</tr>
7 years ago
<tr>
<td class="text-center pr-2">@icon(fa-table, Tables:)</td>
<td>{{ $tables_count }} table{{$tables_count!=1?'s':''}}</td>
</tr>
7 years ago
<tr>
<td class="text-center pr-2">@icon(fa-calendar, Join date:)</td>
<td>
<span class="pr-1" data-toggle="tooltip" data-placement="right"
title="{{ $user->created_at->format('M n, Y \\a\\t G:i') }}">
Joined {{ $user->created_at->diffForHumans() }}
</span>
</td>
7 years ago
</tr>
</tbody>
</table>
</div>
</div>
7 years ago
</div>
7 years ago
{{-- Table list card --}}
<div class="col-md-8 mt-2 mt-md-0">
7 years ago
<div class="card">
<div class="card-header card-header-extra">
@icon(fa-table fa-pr fa-large)
7 years ago
<h2>
@if(authed() && user()->is($user))
7 years ago
Your Tables
@else
User's Tables
@endif
7 years ago
</h2>
7 years ago
<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))
7 years ago
<a href="{{route('table.create')}}" class="btn ml-3" aria-label="New Table">New</a>
7 years ago
@endif
</div>
@include('profile._table-list')
7 years ago
</div>
</div>
7 years ago
</div>
@endsection