blue-twilight/resources/views/themes/base/gallery/user_profile.blade.php

115 lines
5.8 KiB
PHP
Raw Normal View History

@extends(Theme::viewName('layout'))
@section('title', $user->name)
@section('breadcrumb')
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
<li class="breadcrumb-item active">{{ $user->name }}</li>
@endsection
@section('content')
<div class="container">
<div class="row">
<div id="user-avatar" class="col-sm-4 col-md-3 col-xl-2 mb-3">
<img class="rounded" src="{{ Theme::gravatarUrl($user->email, 160) }}" title="{{ $user->name }}" />
</div>
<div class="col-sm-8 col-md-9 col-xl-10">
<h1>{{ $user->name }}</h1>
@if (!empty($user->profile_alias))
<h2 class="text-muted">{{ $user->profile_alias }}</h2>
@endif
</div>
</div>
<div class="row mt-5">
<div class="col">
@if (count($albums) == 0)
<h4 class="text-danger"><b>@lang('gallery.user_profile.no_albums_p1')</b></h4>
<p>@lang('gallery.user_profile.no_albums_p2', ['user_name' => $user->name])</p>
@else
<h3 class="mb-4 text-muted">@lang('gallery.user_profile.albums', ['user_name' => $user->name])</h3>
<div class="row">
@foreach ($albums as $album)
<div class="col-6 col-sm-4 col-md-3 text-left" style="max-width: 250px;">
<div class="card mb-3">
<img class="card-img-top" src="{{ $album->thumbnailUrl('preview') }}" style="max-height: 120px;"/>
<div class="card-body">
<h5 class="card-title"><a href="{{ $album->url() }}">{{ $album->name }}</a></h5>
</div>
<div class="card-footer">
<small class="text-muted">
<i class="fa fa-fw fa-photo"></i> {{ number_format($album->photos_count) }} {{ trans_choice('gallery.photos', $album->photos_count) }}
@if ($album->children_count > 0)
<i class="fa fa-fw fa-book ml-3"></i> {{ number_format($album->children_count) }} {{ trans_choice('gallery.child_albums', $album->children_count) }}
@endif
</small>
</div>
</div>
</div>
@endforeach
</div>
@endif
<h3 class="mt-5 mb-4 text-muted">@lang('gallery.user_profile.activity')</h3>
<div>
{{-- Nav tabs --}}
<ul class="nav nav-tabs" role="tablist">
@include(Theme::viewName('partials.tab'), ['active_tab' => 'activity-taken', 'tab_name' => 'activity-taken', 'tab_icon' => 'camera', 'tab_text' => trans('gallery.user_profile.activity_taken_tab')])
@include(Theme::viewName('partials.tab'), ['active_tab' => 'activity-taken', 'tab_name' => 'activity-uploaded', 'tab_icon' => 'upload', 'tab_text' => trans('gallery.user_profile.activity_uploaded_tab')])
</ul>
{{-- Tab panes --}}
<div class="tab-content">
{{-- Photos taken --}}
<div role="tabpanel" class="tab-pane active" id="activity-taken-tab">
<p>@lang('gallery.user_profile.activity_taken_p1', ['user_name' => $user->name])</p>
@include (Theme::viewName('partials.user_profile_activity_grid'), ['activity' => $activity_taken])
</div>
{{-- Photos uploaded --}}
<div role="tabpanel" class="tab-pane" id="activity-uploaded-tab">
<p>@lang('gallery.user_profile.activity_uploaded_p1', ['user_name' => $user->name])</p>
@include (Theme::viewName('partials.user_profile_activity_grid'), ['activity' => $activity_uploaded])
</div>
</div>
</div>
@if (count($cameras) > 0)
<h3 class="mb-4 mt-5 text-muted">@lang('gallery.user_profile.cameras')</h3>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>@lang('admin.album_camera_make')</th>
<th>@lang('admin.album_camera_model')</th>
<th>@lang('admin.album_camera_software')</th>
<th>@lang('admin.album_camera_photo_count')</th>
</tr>
</thead>
<tbody>
@foreach ($cameras as $camera)
<tr>
<td>{{ $camera->camera_make }}</td>
<td>{{ $camera->camera_model }}</td>
<td>{{ $camera->camera_software }}</td>
<td>{{ $camera->photo_count }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</div>
</div>
@endsection
@push ('scripts')
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
</script>
@endpush