Allow users to filter albums by contributors #48

Merged
Roflin merged 18 commits from refactor/viewalbum into master 2024-01-20 20:11:18 +01:00
Showing only changes of commit 52472d8b58 - Show all commits

View File

@ -50,7 +50,9 @@ class ViewPhotoAlbum extends HTMLController
$filters = []; $filters = [];
if (!empty($contributors)) if (!empty($contributors))
{ {
$filters[''] = ['id_user' => null, 'caption' => 'Show all photos', 'link' => $tag->getUrl()]; $filters[''] = ['id_user' => null, 'label' => '', 'caption' => 'Show all photos',
Aaron marked this conversation as resolved Outdated

Key label missing

Key `label` missing
Outdated
Review

I initially didn't add it as it'd never be used. You're right, though, and it's better to just have it there for consistency.

I initially didn't add it as it'd never be used. You're right, though, and it's better to just have it there for consistency.
'link' => $tag->getUrl()];
foreach ($contributors as $contributor) foreach ($contributors as $contributor)
{ {
$filters[$contributor['slug']] = [ $filters[$contributor['slug']] = [