Lines 48-53
use Koha::RecordProcessor;
Link Here
|
48 |
|
48 |
|
49 |
use constant ANYONE => 2; |
49 |
use constant ANYONE => 2; |
50 |
use constant STAFF => 3; |
50 |
use constant STAFF => 3; |
|
|
51 |
use constant PERMITTED => 4; |
51 |
|
52 |
|
52 |
my $query = CGI->new; |
53 |
my $query = CGI->new; |
53 |
|
54 |
|
Lines 118-126
if ( $op eq 'add_form' ) {
Link Here
|
118 |
{ shelfname => scalar $query->param('shelfname'), |
119 |
{ shelfname => scalar $query->param('shelfname'), |
119 |
sortfield => scalar $query->param('sortfield'), |
120 |
sortfield => scalar $query->param('sortfield'), |
120 |
public => $public, |
121 |
public => $public, |
121 |
allow_change_from_owner => $allow_changes_from > 0, |
122 |
allow_change_from_owner => $allow_changes_from > 0, |
122 |
allow_change_from_others => $allow_changes_from == ANYONE, |
123 |
allow_change_from_others => $allow_changes_from == ANYONE, |
123 |
allow_change_from_staff => $allow_changes_from == STAFF, |
124 |
allow_change_from_staff => $allow_changes_from == STAFF, |
|
|
125 |
allow_change_from_permitted_staff => $allow_changes_from == PERMITTED, |
124 |
owner => scalar $loggedinuser, |
126 |
owner => scalar $loggedinuser, |
125 |
} |
127 |
} |
126 |
); |
128 |
); |
Lines 153-158
if ( $op eq 'add_form' ) {
Link Here
|
153 |
$shelf->allow_change_from_owner( $allow_changes_from > 0 ); |
155 |
$shelf->allow_change_from_owner( $allow_changes_from > 0 ); |
154 |
$shelf->allow_change_from_others( $allow_changes_from == ANYONE ); |
156 |
$shelf->allow_change_from_others( $allow_changes_from == ANYONE ); |
155 |
$shelf->allow_change_from_staff( $allow_changes_from == STAFF ); |
157 |
$shelf->allow_change_from_staff( $allow_changes_from == STAFF ); |
|
|
158 |
$shelf->allow_change_from_permitted_staff( $allow_changes_from == PERMITTED ); |
156 |
$shelf->public( $public ); |
159 |
$shelf->public( $public ); |
157 |
eval { $shelf->store }; |
160 |
eval { $shelf->store }; |
158 |
|
161 |
|
Lines 487-503
if ( $op eq 'view' ) {
Link Here
|
487 |
); |
490 |
); |
488 |
} |
491 |
} |
489 |
|
492 |
|
490 |
my $staffuser; |
493 |
my ($staffuser, $permitteduser); |
491 |
$staffuser = Koha::Patrons->find( $loggedinuser )->can_patron_change_staff_only_lists if $loggedinuser; |
494 |
$staffuser = Koha::Patrons->find( $loggedinuser )->can_patron_change_staff_only_lists if $loggedinuser; |
|
|
495 |
$permitteduser = Koha::Patrons->find( $loggedinuser )->can_patron_change_permitted_staff_lists if $loggedinuser; |
496 |
|
492 |
$template->param( |
497 |
$template->param( |
493 |
op => $op, |
498 |
op => $op, |
494 |
referer => $referer, |
499 |
referer => $referer, |
495 |
shelf => $shelf, |
500 |
shelf => $shelf, |
496 |
messages => \@messages, |
501 |
messages => \@messages, |
497 |
public => $public, |
502 |
public => $public, |
498 |
print => scalar $query->param('print') || 0, |
503 |
print => scalar $query->param('print') || 0, |
499 |
listsview => 1, |
504 |
listsview => 1, |
500 |
staffuser => $staffuser, |
505 |
staffuser => $staffuser, |
|
|
506 |
permitteduser => $permitteduser |
501 |
); |
507 |
); |
502 |
|
508 |
|
503 |
my $content_type = $query->param('rss')? 'rss' : 'html'; |
509 |
my $content_type = $query->param('rss')? 'rss' : 'html'; |