#19: Added a link to user's public profile page, if enabled. Removed a stray semi-colon in album views. Updated user's profile page to use the new partial view for child albums.

This commit is contained in:
Andy Heathershaw 2018-08-11 09:30:48 +01:00
parent a22ce0c57a
commit eaba161f5c
7 changed files with 29 additions and 30 deletions

View File

@ -33,6 +33,7 @@ return [
'labels' => 'Labels', 'labels' => 'Labels',
'login' => 'Login', 'login' => 'Login',
'logout' => 'Logout', 'logout' => 'Logout',
'public_profile_page' => 'My public profile',
'quick_post' => 'Quick Upload', 'quick_post' => 'Quick Upload',
'register' => 'Register', 'register' => 'Register',
'statistics' => 'Statistics' 'statistics' => 'Statistics'

View File

@ -57,7 +57,7 @@
<div class="row"> <div class="row">
@foreach ($child_albums as $childAlbum) @foreach ($child_albums as $childAlbum)
@include(Theme::viewName('partials.gallery_child_album')); @include(Theme::viewName('partials.gallery_child_album'))
@endforeach @endforeach
</div> </div>
</div> </div>

View File

@ -32,7 +32,7 @@
<div class="row"> <div class="row">
@foreach ($child_albums as $childAlbum) @foreach ($child_albums as $childAlbum)
@include(Theme::viewName('partials.gallery_child_album')); @include(Theme::viewName('partials.gallery_child_album'))
@endforeach @endforeach
</div> </div>
@endif @endif

View File

@ -64,7 +64,7 @@
<div class="row"> <div class="row">
@foreach ($child_albums as $childAlbum) @foreach ($child_albums as $childAlbum)
@include(Theme::viewName('partials.gallery_child_album')); @include(Theme::viewName('partials.gallery_child_album'))
@endforeach @endforeach
</div> </div>
</div> </div>

View File

@ -30,24 +30,8 @@
<h3 class="mb-4 text-muted">@lang('gallery.user_profile.albums', ['user_name' => $user->name])</h3> <h3 class="mb-4 text-muted">@lang('gallery.user_profile.albums', ['user_name' => $user->name])</h3>
<div class="row"> <div class="row">
@foreach ($albums as $album) @foreach ($albums as $childAlbum)
<div class="col-6 col-sm-4 col-md-3 text-left" style="max-width: 250px;"> @include(Theme::viewName('partials.gallery_child_album'), ['show_text' => true])
<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 @endforeach
</div> </div>
@endif @endif

View File

@ -6,6 +6,15 @@
</div> </div>
<div class="card-footer"> <div class="card-footer">
<small class="text-muted"> <small class="text-muted">
@if (isset($show_text) && boolval($show_text))
<i class="fa fa-fw fa-photo"></i> {{ number_format($childAlbum->photos_count) }} {{ trans_choice('gallery.photos', $childAlbum->photos_count) }}
@if ($childAlbum->children_count > 0)
<i class="fa fa-fw fa-book ml-3"></i> {{ number_format($childAlbum->children_count) }} {{ trans_choice('gallery.child_albums', $childAlbum->children_count) }}
@endif
{{-- We don't have enough room to show the album owner if show_text is true --}}
@else
<i class="fa fa-fw fa-photo" data-toggle="tooltip" data-placement="top" title="{{ number_format($childAlbum->photos_count) }} {{ trans_choice('gallery.photos', $childAlbum->photos_count) }}"></i> <i class="fa fa-fw fa-photo" data-toggle="tooltip" data-placement="top" title="{{ number_format($childAlbum->photos_count) }} {{ trans_choice('gallery.photos', $childAlbum->photos_count) }}"></i>
@if ($childAlbum->children_count > 0) @if ($childAlbum->children_count > 0)
@ -19,6 +28,7 @@
<i class="fa fa-fw fa-user ml-2" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"></i> <i class="fa fa-fw fa-user ml-2" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"></i>
@endif @endif
@endif @endif
@endif
</small> </small>
</div> </div>
</div> </div>

View File

@ -76,6 +76,10 @@
{{--<img class="avatar" src="{{ Theme::gravatarUrl(Auth::user()->email, 42) }}" alt="{{ Auth::user()->name }}" title="{{ Auth::user()->name }}" />--}} {{--<img class="avatar" src="{{ Theme::gravatarUrl(Auth::user()->email, 42) }}" alt="{{ Auth::user()->name }}" title="{{ Auth::user()->name }}" />--}}
</a> </a>
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">
@if (UserConfig::get('social_user_profiles') && Auth::user()->enable_profile_page)
<a class="dropdown-item" href="{{ Auth::user()->profileUrl() }}">@lang('navigation.navbar.public_profile_page')</a>
<div class="dropdown-divider"></div>
@endif
<a class="dropdown-item" href="{{ route('auth.changePassword') }}">@lang('navigation.navbar.change_password')</a> <a class="dropdown-item" href="{{ route('auth.changePassword') }}">@lang('navigation.navbar.change_password')</a>
<a class="dropdown-item" href="{{ url('/logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">@lang('navigation.navbar.logout')</a> <a class="dropdown-item" href="{{ url('/logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">@lang('navigation.navbar.logout')</a>
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;"> <form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">