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