Lines 44-52
addbybiblionumber.pl
Link Here
|
44 |
if this parameter exists, then it must be equals to the name of the shelf |
44 |
if this parameter exists, then it must be equals to the name of the shelf |
45 |
to add. |
45 |
to add. |
46 |
|
46 |
|
47 |
=item category |
47 |
=item public |
48 |
|
48 |
|
49 |
if this script has to add a shelf, it add one with this category. |
49 |
if this script has to add a shelf, it adds one with this 'public' setting. |
50 |
|
50 |
|
51 |
=item newshelf |
51 |
=item newshelf |
52 |
|
52 |
|
Lines 69-75
my $query = CGI->new;
Link Here
|
69 |
my $shelfnumber = $query->param('shelfnumber'); |
69 |
my $shelfnumber = $query->param('shelfnumber'); |
70 |
my $newvirtualshelf = $query->param('newvirtualshelf'); |
70 |
my $newvirtualshelf = $query->param('newvirtualshelf'); |
71 |
my $newshelf = $query->param('newshelf'); |
71 |
my $newshelf = $query->param('newshelf'); |
72 |
my $category = $query->param('category'); |
72 |
my $public = $query->param('public'); |
73 |
my $sortfield = $query->param('sortfield'); |
73 |
my $sortfield = $query->param('sortfield'); |
74 |
my $confirmed = $query->param('confirmed') || 0; |
74 |
my $confirmed = $query->param('confirmed') || 0; |
75 |
my ( $errcode, $authorized ) = ( 0, 1 ); |
75 |
my ( $errcode, $authorized ) = ( 0, 1 ); |
Lines 95-101
if ($newvirtualshelf) {
Link Here
|
95 |
Koha::Virtualshelf->new( |
95 |
Koha::Virtualshelf->new( |
96 |
{ |
96 |
{ |
97 |
shelfname => $newvirtualshelf, |
97 |
shelfname => $newvirtualshelf, |
98 |
category => $category, |
98 |
public => $public, |
99 |
sortfield => $sortfield, |
99 |
sortfield => $sortfield, |
100 |
owner => $loggedinuser, |
100 |
owner => $loggedinuser, |
101 |
} |
101 |
} |
Lines 149-169
if ($newvirtualshelf) {
Link Here
|
149 |
|
149 |
|
150 |
} else { |
150 |
} else { |
151 |
my $private_shelves = Koha::Virtualshelves->search( |
151 |
my $private_shelves = Koha::Virtualshelves->search( |
152 |
{ category => 1, |
152 |
{ public => 0, |
153 |
owner => $loggedinuser, |
153 |
owner => $loggedinuser, |
154 |
allow_change_from_owner => 1, |
154 |
allow_change_from_owner => 1, |
155 |
}, |
155 |
}, |
156 |
{ order_by => 'shelfname' } |
156 |
{ order_by => 'shelfname' } |
157 |
); |
157 |
); |
158 |
my $shelves_shared_with_me = Koha::Virtualshelves->search( |
158 |
my $shelves_shared_with_me = Koha::Virtualshelves->search( |
159 |
{ category => 1, |
159 |
{ public => 0, |
160 |
'virtualshelfshares.borrowernumber' => $loggedinuser, |
160 |
'virtualshelfshares.borrowernumber' => $loggedinuser, |
161 |
allow_change_from_others => 1, |
161 |
allow_change_from_others => 1, |
162 |
}, |
162 |
}, |
163 |
{ join => 'virtualshelfshares', } |
163 |
{ join => 'virtualshelfshares', } |
164 |
); |
164 |
); |
165 |
my $public_shelves = Koha::Virtualshelves->search( |
165 |
my $public_shelves = Koha::Virtualshelves->search( |
166 |
{ category => 2, |
166 |
{ public => 1, |
167 |
-or => [ |
167 |
-or => [ |
168 |
-and => { |
168 |
-and => { |
169 |
allow_change_from_owner => 1, |
169 |
allow_change_from_owner => 1, |
170 |
- |
|
|