(bug #3772) show place hold button in isbd view

This fix the isbd view to show the "place hold" button.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Nahuel ANGELINETTI 2009-11-05 16:59:07 +01:00 committed by Galen Charlton
parent 5f5d093c5b
commit 3807dd7b19
1 changed files with 16 additions and 2 deletions

View File

@ -50,6 +50,7 @@ use C4::Output;
use CGI;
use MARC::Record;
use C4::Biblio;
use C4::Items;
use C4::Acquisition;
use C4::Review;
use C4::Serials; # uses getsubscriptionfrom biblionumber
@ -123,9 +124,19 @@ $template->param(
subscriptionsnumber => $subscriptionsnumber,
);
# my @blocs = split /\@/,$ISBD;
# my @fields = $record->fields();
my $norequests = 1;
my $res = GetISBDView($biblionumber, "opac");
my @items = &GetItemsInfo($biblionumber, 'opac');
my $itemtypes = GetItemTypes();
for my $itm (@items) {
$norequests = 0
if ( (not $itm->{'wthdrawn'} )
&& (not $itm->{'itemlost'} )
&& ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} )
&& (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
&& ($itm->{'itemnumber'} ) );
}
my $reviews = getreviews( $biblionumber, 1 );
foreach ( @$reviews ) {
@ -139,6 +150,9 @@ foreach ( @$reviews ) {
$template->param(
RequestOnOpac => C4::Context->preference("RequestOnOpac"),
AllowOnShelfHolds => C4::Context->preference('AllowOnShelfHolds'),
norequests => $norequests,
ISBD => $res,
biblionumber => $biblionumber,
reviews => $reviews,