Lines 89-94
$public = 1 if $query->param('public') && $query->param('public') == 1;
Link Here
|
89 |
|
89 |
|
90 |
my ( $shelf, $shelfnumber, @messages ); |
90 |
my ( $shelf, $shelfnumber, @messages ); |
91 |
|
91 |
|
|
|
92 |
# PART 1: Perform a few actions |
92 |
if ( $op eq 'add_form' ) { |
93 |
if ( $op eq 'add_form' ) { |
93 |
# Only pass default |
94 |
# Only pass default |
94 |
$shelf = { allow_change_from_owner => 1 }; |
95 |
$shelf = { allow_change_from_owner => 1 }; |
Lines 255-262
if ( $op eq 'add_form' ) {
Link Here
|
255 |
push @messages, { type => 'error', code => 'does_not_exist' }; |
256 |
push @messages, { type => 'error', code => 'does_not_exist' }; |
256 |
} |
257 |
} |
257 |
$op = 'view'; |
258 |
$op = 'view'; |
|
|
259 |
} elsif( $op eq 'transfer' ) { |
260 |
$op = 'list'; # TODO |
258 |
} |
261 |
} |
259 |
|
262 |
|
|
|
263 |
# PART 2: After a possible action, view one list or show a number of lists |
260 |
if ( $op eq 'view' ) { |
264 |
if ( $op eq 'view' ) { |
261 |
$shelfnumber ||= $query->param('shelfnumber'); |
265 |
$shelfnumber ||= $query->param('shelfnumber'); |
262 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
266 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
Lines 424-432
if ( $op eq 'view' ) {
Link Here
|
424 |
} else { |
428 |
} else { |
425 |
push @messages, { type => 'error', code => 'does_not_exist' }; |
429 |
push @messages, { type => 'error', code => 'does_not_exist' }; |
426 |
} |
430 |
} |
427 |
} |
431 |
} elsif ( $op eq 'list' ) { |
428 |
|
|
|
429 |
if ( $op eq 'list' ) { |
430 |
my $shelves; |
432 |
my $shelves; |
431 |
my ( $page, $rows ) = ( $query->param('page') || 1, 20 ); |
433 |
my ( $page, $rows ) = ( $query->param('page') || 1, 20 ); |
432 |
if ( !$public ) { |
434 |
if ( !$public ) { |
Lines 444-449
if ( $op eq 'list' ) {
Link Here
|
444 |
), |
446 |
), |
445 |
); |
447 |
); |
446 |
} |
448 |
} |
|
|
449 |
|
447 |
my $staffuser; |
450 |
my $staffuser; |
448 |
$staffuser = Koha::Patrons->find( $loggedinuser )->can_patron_change_staff_only_lists if $loggedinuser; |
451 |
$staffuser = Koha::Patrons->find( $loggedinuser )->can_patron_change_staff_only_lists if $loggedinuser; |
449 |
$template->param( |
452 |
$template->param( |
450 |
- |
|
|