use C4::Review;
use C4::Serials;
use C4::Members;
+use C4::VirtualShelves;
use C4::XSLT;
BEGIN {
);
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
+
+$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
+$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
+
my $record = GetMarcBiblio($biblionumber);
$template->param( biblionumber => $biblionumber );
# XSLT processing of some stuff
$cell{subscriptionid} = $subscription->{subscriptionid};
$cell{subscriptionnotes} = $subscription->{notes};
$cell{branchcode} = $subscription->{branchcode};
+ $cell{branchname} = GetBranchName($subscription->{branchcode});
$cell{hasalert} = $subscription->{hasalert};
#get the three latest serials.
$serials_to_display = $subscription->{opacdisplaycount};
$itm->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} );
$itm->{'description'} = $itemtypes->{ $itm->{itype} }->{'description'};
}
- foreach (qw(ccode enumchron copynumber itemnotes)) {
+ foreach (qw(ccode enumchron copynumber itemnotes uri)) {
$itemfields{$_} = 1 if ($itm->{$_});
}
RequestOnOpac => C4::Context->preference("RequestOnOpac"),
itemdata_ccode => $itemfields{ccode},
itemdata_enumchron => $itemfields{enumchron},
+ itemdata_uri => $itemfields{uri},
itemdata_copynumber => $itemfields{copynumber},
itemdata_itemnotes => $itemfields{itemnotes},
authorised_value_images => $biblio_authorised_value_images,
my $reviews = getreviews( $biblionumber, 1 );
my $loggedincommenter;
foreach ( @$reviews ) {
- my $borrowerData = GetMember($_->{borrowernumber},'borrowernumber');
+ my $borrowerData = GetMember('borrowernumber' => $_->{borrowernumber});
# setting some borrower info into this hash
$_->{title} = $borrowerData->{'title'};
$_->{surname} = $borrowerData->{'surname'};
$_->{firstname} = $borrowerData->{'firstname'};
$_->{userid} = $borrowerData->{'userid'};
+ $_->{cardnumber} = $borrowerData->{'cardnumber'};
$_->{datereviewed} = format_date($_->{datereviewed});
if ($borrowerData->{'borrowernumber'} eq $borrowernumber) {
$_->{your_comment} = 1;
loggedincommenter => $loggedincommenter
);
+# Lists
+
+if (C4::Context->preference("virtualshelves") ) {
+ $template->param( 'GetShelves' => GetBibliosShelves( $biblionumber ) );
+}
+
+
# XISBN Stuff
if (C4::Context->preference("OPACFRBRizeEditions")==1) {
eval {
my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour, \@services );
my $similar_products_exist;
if ( $amazon_reviews ) {
- my $item = $amazon_details->{Items}->{Item};
+ my $item = $amazon_details->{Items}->{Item}->[0];
my $customer_reviews = \@{ $item->{CustomerReviews}->{Review} };
for my $one_review ( @$customer_reviews ) {
$one_review->{Date} = format_date($one_review->{Date});
$template->param( AMAZON_EDITORIAL_REVIEWS => $editorial_reviews );
}
if ( $amazon_similars ) {
- my $item = $amazon_details->{Items}->{Item};
+ my $item = $amazon_details->{Items}->{Item}->[0];
my @similar_products;
for my $similar_product (@{ $item->{SimilarProducts}->{SimilarProduct} }) {
# do we have any of these isbns in our collection?
'sort'=>'-weight', limit=>$tag_quantity}));
}
+#Search for title in links
+if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
+ $search_for_title =~ s/{AUTHOR}/$dat->{author}/g;
+ $search_for_title =~ s/{TITLE}/$dat->{title}/g;
+ $search_for_title =~ s/{ISBN}/$isbn/g;
+ $template->param('OPACSearchForTitleIn' => $search_for_title);
+}
+
+
output_html_with_http_headers $query, $cookie, $template->output;