7 use C4::Interface::CGI::Output;
11 my ($template, $borrowernumber, $cookie)
12 = get_template_and_user({template_name => "opac-detail.tmpl",
16 flagsrequired => {borrow => 1},
19 my $biblionumber=$query->param('bib');
20 $template->param(biblionumber => $biblionumber);
23 # change back when ive fixed request.pl
24 my @items = &ItemInfo(undef, $biblionumber, 'opac');
25 my $dat = &bibdata($biblionumber);
26 my ($authorcount, $addauthor) = &addauthor($biblionumber);
27 my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
28 my ($websitecount, @websites) = &getwebsites($biblionumber);
30 $dat->{'count'}=@items;
32 $dat->{'additional'}=$addauthor->[0]->{'author'};
33 for (my $i = 1; $i < $authorcount; $i++) {
34 $dat->{'additional'} .= "|" . $addauthor->[$i]->{'author'};
38 foreach my $itm (@items) {
39 $norequests = 0 unless $itm->{'notforloan'};
40 $itm->{$itm->{'publictype'}} = 1;
43 $template->param(norequests => $norequests);
45 my @results = ($dat,);
47 my $resultsarray=\@results;
48 my $itemsarray=\@items;
49 my $webarray=\@webbiblioitems;
50 my $sitearray=\@websites;
52 $template->param(BIBLIO_RESULTS => $resultsarray);
53 $template->param(ITEM_RESULTS => $itemsarray);
54 $template->param(WEB_RESULTS => $webarray);
55 $template->param(SITE_RESULTS => $sitearray,
56 LibraryName => C4::Context->preference("LibraryName"),
59 output_html_with_http_headers $query, $cookie, $template->output;