use Modern::Perl;
use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
-use C4::Search;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Search qw( enabled_staff_search_views );
use Koha::Biblios;
use Koha::Items;
my $imagenumber = $query->param('imagenumber');
my $biblio = Koha::Biblios->find( $biblionumber );
my $itemcount = $biblio ? $biblio->items->count : 0;
-my @items = GetItemsInfo($biblionumber);
if ( $query->cookie("holdfor") ) {
my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") );
$template->param(
- holdfor => $query->cookie("holdfor"),
- holdfor_surname => $holdfor_patron->surname,
- holdfor_firstname => $holdfor_patron->firstname,
- holdfor_cardnumber => $holdfor_patron->cardnumber,
+ holdfor => $query->cookie("holdfor"),
+ holdfor_patron => $holdfor_patron,
);
}
$template->param(
LocalCoverImages => 1,
images => $images,
- imagenumber => (@$images ? $images->[0]->imagenumber : undef),
+ imagenumber => ( $imagenumber || ( @$images ? $images->[0]->imagenumber : undef ) ),
);
}
$template->{VARS}->{'count'} = $itemcount;