|
Lines 19-26
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
use CGI qw ( -utf8 ); |
21 |
use CGI qw ( -utf8 ); |
| 22 |
use C4::Auth qw( get_template_and_user ); |
22 |
use C4::Auth qw( get_template_and_user haspermission ); |
| 23 |
use C4::Biblio qw( GetMarcBiblio ); |
23 |
use C4::Biblio qw( GetMarcBiblio ); |
|
|
24 |
use C4::Context; |
| 24 |
use C4::Koha qw( |
25 |
use C4::Koha qw( |
| 25 |
GetNormalizedEAN |
26 |
GetNormalizedEAN |
| 26 |
GetNormalizedISBN |
27 |
GetNormalizedISBN |
|
Lines 56-62
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
| 56 |
my $op = $query->param('op') || 'list'; |
57 |
my $op = $query->param('op') || 'list'; |
| 57 |
my $referer = $query->param('referer') || $op; |
58 |
my $referer = $query->param('referer') || $op; |
| 58 |
my $public = $query->param('public') ? 1 : 0; |
59 |
my $public = $query->param('public') ? 1 : 0; |
| 59 |
my ( $shelf, $shelfnumber, @messages ); |
60 |
my ( $shelf, $shelfnumber, @messages, $allow_transfer ); |
| 60 |
|
61 |
|
| 61 |
if ( $op eq 'add_form' ) { |
62 |
if ( $op eq 'add_form' ) { |
| 62 |
# Only pass default |
63 |
# Only pass default |
|
Lines 352-357
if ( $op eq 'view' ) {
Link Here
|
| 352 |
} else { |
353 |
} else { |
| 353 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
354 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
| 354 |
} |
355 |
} |
|
|
356 |
} elsif( $op eq 'list' ) { |
| 357 |
$allow_transfer = haspermission( C4::Context->userenv->{id}, { lists => 'edit_public_lists' } ) ? 1 : 0; |
| 355 |
} |
358 |
} |
| 356 |
|
359 |
|
| 357 |
$template->param( |
360 |
$template->param( |
|
Lines 362-367
$template->param(
Link Here
|
| 362 |
public => $public, |
365 |
public => $public, |
| 363 |
print => scalar $query->param('print') || 0, |
366 |
print => scalar $query->param('print') || 0, |
| 364 |
csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' })->as_list ], |
367 |
csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' })->as_list ], |
|
|
368 |
allow_transfer => $allow_transfer, |
| 365 |
); |
369 |
); |
| 366 |
|
370 |
|
| 367 |
output_html_with_http_headers $query, $cookie, $template->output; |
371 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 368 |
- |
|
|