3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA 02111-1307 USA
28 my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
30 template_name => "opac-basket.tmpl",
34 flagsrequired => { borrow => 1 },
38 my $bib_list = $query->param('bib_list');
39 my $print_basket = $query->param('print');
40 my $verbose = $query->param('verbose');
42 if ($verbose) { $template->param( verbose => 1 ); }
43 if ($print_basket) { $template->param( print_basket => 1 ); }
45 my @bibs = split( /\//, $bib_list );
49 my $marcflavour = C4::Context->preference('marcflavour');
50 foreach my $biblionumber ( @bibs ) {
51 $template->param( biblionumber => $biblionumber );
53 my $dat = &GetBiblioData($biblionumber);
54 my $record = &GetMarcBiblio($biblionumber);
55 my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
56 my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
57 my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
58 my @items = &GetItemsInfo( $biblionumber, 'opac' );
60 if ( $num % 2 == 1 ) {
65 $dat->{biblionumber} = $biblionumber;
66 $dat->{ITEM_RESULTS} = \@items;
67 $dat->{MARCNOTES} = $marcnotesarray;
68 $dat->{MARCSUBJCTS} = $marcsubjctsarray;
69 $dat->{MARCAUTHORS} = $marcauthorsarray;
71 if ( C4::Context->preference("BiblioDefaultView") eq "normal" ) {
72 $dat->{dest} = "opac-detail.pl";
74 elsif ( C4::Context->preference("BiblioDefaultView") eq "marc" ) {
75 $dat->{dest} = "opac-MARCdetail.pl";
78 $dat->{dest} = "opac-ISBDdetail.pl";
80 push( @results, $dat );
83 my $resultsarray = \@results;
85 # my $itemsarray=\@items;
88 BIBLIO_RESULTS => $resultsarray,
91 output_html_with_http_headers $query, $cookie, $template->output;