Lines 204-227
sub get_xslt_sysprefs {
Link Here
|
204 |
} |
204 |
} |
205 |
|
205 |
|
206 |
sub get_xsl_filename { |
206 |
sub get_xsl_filename { |
207 |
my ( $xslsyspref ) = @_; |
207 |
my ( $xslsyspref, $xslfilename ) = @_; |
208 |
|
208 |
|
209 |
my $lang = C4::Languages::getlanguage(); |
209 |
my $lang = C4::Languages::getlanguage(); |
210 |
|
210 |
|
211 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
211 |
$xslfilename ||= C4::Context->preference($xslsyspref) || "default"; |
212 |
|
212 |
|
213 |
if ($xslsyspref eq "XSLTCustomExport") { |
213 |
if ($xslsyspref eq "XSLTCustomExport") { |
214 |
my $dir; |
214 |
my $dir; |
215 |
$dir = C4::Context->config('intrahtdocs') . |
215 |
$dir = C4::Context->config('intrahtdocs') . |
216 |
'/' . C4::Context->preference("template") . |
216 |
'/' . C4::Context->preference("template") . |
217 |
'/' . C4::Languages::getlanguage() . |
217 |
'/' . $lang . |
218 |
'/xslt/biblioexport'; |
218 |
'/xslt/biblioexport'; |
219 |
$xslfilename = $dir . "/" . $xslfilename; |
219 |
$xslfilename = $dir . "/" . $xslfilename; |
220 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
220 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
221 |
my $dir; |
221 |
my $dir; |
222 |
$dir = C4::Context->config('opachtdocs') . |
222 |
$dir = C4::Context->config('opachtdocs') . |
223 |
'/' . C4::Context->preference("opacthemes") . |
223 |
'/' . C4::Context->preference("opacthemes") . |
224 |
'/' . C4::Languages::getlanguage() . |
224 |
'/' . $lang . |
225 |
'/xslt/biblioexport'; |
225 |
'/xslt/biblioexport'; |
226 |
$xslfilename = $dir . "/" . $xslfilename; |
226 |
$xslfilename = $dir . "/" . $xslfilename; |
227 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
227 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
Lines 281-291
sub XSLTParse4Display {
Link Here
|
281 |
my $hidden_items = $params->{hidden_items} || []; |
281 |
my $hidden_items = $params->{hidden_items} || []; |
282 |
my $variables = $params->{xslt_variables}; |
282 |
my $variables = $params->{xslt_variables}; |
283 |
my $items_rs = $params->{items_rs}; |
283 |
my $items_rs = $params->{items_rs}; |
|
|
284 |
my $xslfilename = $params->{xslfilename}; |
284 |
|
285 |
|
285 |
die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}" |
286 |
die "Mandatory \$params->{xsl_syspref} was not provided, called with biblionumber $params->{biblionumber}" |
286 |
if not defined $params->{xsl_syspref}; |
287 |
if not defined $params->{xsl_syspref}; |
287 |
|
288 |
|
288 |
my $xslfilename = get_xsl_filename( $xslsyspref); |
289 |
$xslfilename = get_xsl_filename( $xslsyspref, $xslfilename); |
289 |
|
290 |
|
290 |
# grab the XML, run it through our stylesheet, push it out to the browser |
291 |
# grab the XML, run it through our stylesheet, push it out to the browser |
291 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
292 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
Lines 298-304
sub XSLTParse4Display {
Link Here
|
298 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
299 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
299 |
|
300 |
|
300 |
my $biblio; |
301 |
my $biblio; |
301 |
my $variables ||= {}; |
302 |
$variables ||= {}; |
302 |
|
303 |
|
303 |
if (C4::Context->preference('OPACShowOpenURL')) { |
304 |
if (C4::Context->preference('OPACShowOpenURL')) { |
304 |
my @biblio_itemtypes; |
305 |
my @biblio_itemtypes; |