Lines 31-36
use C4::Circulation;
Link Here
|
31 |
use C4::Reserves; |
31 |
use C4::Reserves; |
32 |
use Koha::AuthorisedValues; |
32 |
use Koha::AuthorisedValues; |
33 |
use Koha::ItemTypes; |
33 |
use Koha::ItemTypes; |
|
|
34 |
use Koha::Util::Search; |
34 |
use Koha::XSLT::Base; |
35 |
use Koha::XSLT::Base; |
35 |
use Koha::Libraries; |
36 |
use Koha::Libraries; |
36 |
|
37 |
|
Lines 266-276
sub XSLTParse4Display {
Link Here
|
266 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
267 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
267 |
} |
268 |
} |
268 |
} |
269 |
} |
269 |
my $varxml = "<variables>\n"; |
|
|
270 |
while (my ($key, $value) = each %$variables) { |
271 |
$varxml .= "<variable name=\"$key\">$value</variable>\n"; |
272 |
} |
273 |
$varxml .= "</variables>\n"; |
274 |
|
270 |
|
275 |
my $partsxml = ''; |
271 |
my $partsxml = ''; |
276 |
# possibly insert component records into Detail views |
272 |
# possibly insert component records into Detail views |
Lines 280-288
sub XSLTParse4Display {
Link Here
|
280 |
($showcomp eq 'staff' && $xslsyspref !~ m/OPAC/ ) || |
276 |
($showcomp eq 'staff' && $xslsyspref !~ m/OPAC/ ) || |
281 |
($showcomp eq 'opac' && $xslsyspref =~ m/OPAC/ ) ) { |
277 |
($showcomp eq 'opac' && $xslsyspref =~ m/OPAC/ ) ) { |
282 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
278 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
283 |
if ( $biblio->components() ) { |
279 |
my $max_results = 300; |
|
|
280 |
|
281 |
if ( $biblio->components($max_results) ) { |
282 |
my $search_query = Koha::Util::Search::get_component_part_query($biblionumber); |
283 |
$variables->{ComponentPartQuery} = $search_query; |
284 |
|
284 |
my @componentPartRecordXML = ('<componentPartRecords>'); |
285 |
my @componentPartRecordXML = ('<componentPartRecords>'); |
285 |
for my $cb ( @{ $biblio->components() } ) { |
286 |
for my $cb ( @{ $biblio->components($max_results) } ) { |
286 |
if( ref $cb eq 'MARC::Record'){ |
287 |
if( ref $cb eq 'MARC::Record'){ |
287 |
$cb = $cb->as_xml_record(); |
288 |
$cb = $cb->as_xml_record(); |
288 |
} else { |
289 |
} else { |
Lines 298-303
sub XSLTParse4Display {
Link Here
|
298 |
} |
299 |
} |
299 |
} |
300 |
} |
300 |
|
301 |
|
|
|
302 |
my $varxml = "<variables>\n"; |
303 |
while (my ($key, $value) = each %$variables) { |
304 |
$varxml .= "<variable name=\"$key\">$value</variable>\n"; |
305 |
} |
306 |
$varxml .= "</variables>\n"; |
307 |
|
301 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml$partsxml\<\/record\>/; |
308 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml$partsxml\<\/record\>/; |
302 |
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs |
309 |
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs |
303 |
$xmlrecord =~ s/\&amp;/\&/g; |
310 |
$xmlrecord =~ s/\&amp;/\&/g; |