#62: Don't clobber the $albums variables in the navbar, so it now shows all albums not just the single page you're currently viewing

This commit is contained in:
Andy Heathershaw 2018-07-11 08:00:40 +01:00
parent 04d1e59778
commit cc3370c4b1
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class GlobalConfiguration
private function addAlbumsToView()
{
$albums = DbHelper::getAlbumsForCurrentUser_NonPaged()->get();
View::share('albums', $albums);
View::share('g_albums', $albums);
$albumsToUpload = DbHelper::getAlbumsForCurrentUser_NonPaged('upload-photos')->get();
View::share('g_albums_upload', $albumsToUpload);

View File

@ -20,7 +20,7 @@
<i class="fa fa-book"></i> @lang('navigation.navbar.albums')
</a>
<div class="dropdown-menu">
@foreach ($albums as $album)
@foreach ($g_albums as $album)
<a class="dropdown-item" href="{{ $album->url() }}">{{ $album->name }}</a>
@endforeach
</div>