|
Lines 24-30
use C4::Biblio qw(
Link Here
|
| 24 |
GetMarcSubjects |
24 |
GetMarcSubjects |
| 25 |
GetMarcUrls |
25 |
GetMarcUrls |
| 26 |
); |
26 |
); |
| 27 |
use C4::Items qw( GetItemsInfo ); |
|
|
| 28 |
use C4::Auth qw( get_template_and_user ); |
27 |
use C4::Auth qw( get_template_and_user ); |
| 29 |
use C4::Output qw( output_html_with_http_headers ); |
28 |
use C4::Output qw( output_html_with_http_headers ); |
| 30 |
|
29 |
|
|
Lines 72-97
foreach my $biblionumber ( @bibs ) {
Link Here
|
| 72 |
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); |
71 |
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); |
| 73 |
my $marcseriesarray = GetMarcSeries ($record,$marcflavour); |
72 |
my $marcseriesarray = GetMarcSeries ($record,$marcflavour); |
| 74 |
my $marcurlsarray = GetMarcUrls ($record,$marcflavour); |
73 |
my $marcurlsarray = GetMarcUrls ($record,$marcflavour); |
| 75 |
my @items = GetItemsInfo( $biblionumber ); |
|
|
| 76 |
|
74 |
|
| 77 |
my $hasauthors = 0; |
75 |
my $hasauthors = 0; |
| 78 |
if($dat->{'author'} || @$marcauthorsarray) { |
76 |
if($dat->{'author'} || @$marcauthorsarray) { |
| 79 |
$hasauthors = 1; |
77 |
$hasauthors = 1; |
| 80 |
} |
78 |
} |
| 81 |
|
79 |
|
| 82 |
my $shelflocations = |
80 |
# COinS format FIXME: for books Only |
| 83 |
{ map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.location' } ) }; |
81 |
my $fmt = substr $record->leader(), 6,2; |
| 84 |
|
82 |
my $fmts; |
| 85 |
for my $itm (@items) { |
83 |
$fmts->{'am'} = 'book'; |
| 86 |
if ($itm->{'location'}){ |
84 |
$dat->{ocoins_format} = $fmts->{$fmt}; |
| 87 |
$itm->{'location_description'} = $shelflocations->{$itm->{'location'} }; |
|
|
| 88 |
} |
| 89 |
} |
| 90 |
# COinS format FIXME: for books Only |
| 91 |
my $fmt = substr $record->leader(), 6,2; |
| 92 |
my $fmts; |
| 93 |
$fmts->{'am'} = 'book'; |
| 94 |
$dat->{ocoins_format} = $fmts->{$fmt}; |
| 95 |
|
85 |
|
| 96 |
if ( $num % 2 == 1 ) { |
86 |
if ( $num % 2 == 1 ) { |
| 97 |
$dat->{'even'} = 1; |
87 |
$dat->{'even'} = 1; |
|
Lines 99-105
foreach my $biblionumber ( @bibs ) {
Link Here
|
| 99 |
|
89 |
|
| 100 |
$num++; |
90 |
$num++; |
| 101 |
$dat->{biblionumber} = $biblionumber; |
91 |
$dat->{biblionumber} = $biblionumber; |
| 102 |
$dat->{ITEM_RESULTS} = \@items; |
92 |
$dat->{ITEM_RESULTS} = $biblio->items; |
| 103 |
$dat->{MARCNOTES} = $marcnotesarray; |
93 |
$dat->{MARCNOTES} = $marcnotesarray; |
| 104 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
94 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
| 105 |
$dat->{MARCAUTHORS} = $marcauthorsarray; |
95 |
$dat->{MARCAUTHORS} = $marcauthorsarray; |