- my @biblios;
- for my $bib (@biblionumber) {
- my $data = GetBiblioData( $bib );
- push(@biblios,
- { biblionumber => $bib,
- title => $data->{'title'},
- author => $data->{'author'},
- } );
- }
+
+} else {
+ my $private_shelves = Koha::Virtualshelves->search(
+ { public => 0,
+ owner => $loggedinuser,
+ allow_change_from_owner => 1,
+ },
+ { order_by => 'shelfname' }
+ );
+ my $shelves_shared_with_me = Koha::Virtualshelves->search(
+ { public => 0,
+ 'virtualshelfshares.borrowernumber' => $loggedinuser,
+ allow_change_from_others => 1,
+ },
+ { join => 'virtualshelfshares', }
+ );
+ my $public_shelves = Koha::Virtualshelves->search(
+ { public => 1,
+ -or => [
+ -and => {
+ allow_change_from_owner => 1,
+ owner => $loggedinuser,
+ },
+ allow_change_from_others => 1,
+ ],
+ },
+ { order_by => 'shelfname' }
+ );