Browse Source

#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.

tags/v2.2.0-beta.1
Andy Heathershaw 1 year ago
parent
commit
eaba161f5c
7 changed files with 29 additions and 30 deletions
  1. +1
    -0
      resources/lang/en/navigation.php
  2. +1
    -1
      resources/views/themes/base/gallery/album_default.blade.php
  3. +1
    -1
      resources/views/themes/base/gallery/album_empty.blade.php
  4. +1
    -1
      resources/views/themes/base/gallery/album_slideshow.blade.php
  5. +2
    -18
      resources/views/themes/base/gallery/user_profile.blade.php
  6. +19
    -9
      resources/views/themes/base/partials/gallery_child_album.blade.php
  7. +4
    -0
      resources/views/themes/base/partials/navbar.blade.php

+ 1
- 0
resources/lang/en/navigation.php View File

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


+ 1
- 1
resources/views/themes/base/gallery/album_default.blade.php View File

@@ -57,7 +57,7 @@

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


+ 1
- 1
resources/views/themes/base/gallery/album_empty.blade.php View File

@@ -32,7 +32,7 @@

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


+ 1
- 1
resources/views/themes/base/gallery/album_slideshow.blade.php View File

@@ -64,7 +64,7 @@

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


+ 2
- 18
resources/views/themes/base/gallery/user_profile.blade.php View File

@@ -30,24 +30,8 @@
<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>
@foreach ($albums as $childAlbum)
@include(Theme::viewName('partials.gallery_child_album'), ['show_text' => true])
@endforeach
</div>
@endif


+ 19
- 9
resources/views/themes/base/partials/gallery_child_album.blade.php View File

@@ -6,17 +6,27 @@
</div>
<div class="card-footer">
<small class="text-muted">
<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 (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" data-toggle="tooltip" data-placement="top" title="{{ number_format($childAlbum->children_count) }} {{ trans_choice('gallery.child_albums', $childAlbum->children_count) }}"></i>
@endif
@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>

@if ($childAlbum->children_count > 0)
<i class="fa fa-fw fa-book ml-3" data-toggle="tooltip" data-placement="top" title="{{ number_format($childAlbum->children_count) }} {{ trans_choice('gallery.child_albums', $childAlbum->children_count) }}"></i>
@endif

@if (UserConfig::get('social_user_profiles'))
@can('view', $childAlbum->user)
<a href="{{ $childAlbum->user->profileUrl() }}" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"><i class="fa fa-fw fa-user ml-2"></i></a>
@else
<i class="fa fa-fw fa-user ml-2" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"></i>
@if (UserConfig::get('social_user_profiles'))
@can('view', $childAlbum->user)
<a href="{{ $childAlbum->user->profileUrl() }}" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"><i class="fa fa-fw fa-user ml-2"></i></a>
@else
<i class="fa fa-fw fa-user ml-2" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"></i>
@endif
@endif
@endif
</small>


+ 4
- 0
resources/views/themes/base/partials/navbar.blade.php View File

@@ -76,6 +76,10 @@
{{--<img class="avatar" src="{{ Theme::gravatarUrl(Auth::user()->email, 42) }}" alt="{{ Auth::user()->name }}" title="{{ Auth::user()->name }}" />--}}
</a>
<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="{{ 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;">


Loading…
Cancel
Save