Lines 159-164
sub _get_best_default_xslt_filename {
Link Here
|
159 |
sub XSLTParse4Display { |
159 |
sub XSLTParse4Display { |
160 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_; |
160 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_; |
161 |
my $xslfilename = C4::Context->preference($xslsyspref); |
161 |
my $xslfilename = C4::Context->preference($xslsyspref); |
|
|
162 |
my $marcflavour = C4::Context->preference('marcflavour'); |
162 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
163 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
163 |
my $htdocs; |
164 |
my $htdocs; |
164 |
my $theme; |
165 |
my $theme; |
Lines 196-202
sub XSLTParse4Display {
Link Here
|
196 |
# grab the XML, run it through our stylesheet, push it out to the browser |
197 |
# grab the XML, run it through our stylesheet, push it out to the browser |
197 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
198 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
198 |
my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); |
199 |
my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); |
199 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
200 |
my $xmlrecord = $record->as_xml($marcflavour); |
200 |
my $sysxml = "<sysprefs>\n"; |
201 |
my $sysxml = "<sysprefs>\n"; |
201 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
202 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
202 |
DisplayOPACiconsXSLT URLLinkText viewISBD |
203 |
DisplayOPACiconsXSLT URLLinkText viewISBD |
Lines 223-238
sub XSLTParse4Display {
Link Here
|
223 |
## Non-syspref variables that need to be computed |
224 |
## Non-syspref variables that need to be computed |
224 |
$sysxml .= "<OtherVars>"; |
225 |
$sysxml .= "<OtherVars>"; |
225 |
|
226 |
|
226 |
# Fetch the authorised value description for 942$n ( supressed in opac ) for the value '1' |
227 |
unless ( $marcflavour eq 'UNIMARC' ) { |
227 |
# if 942$n is not mapped, the return value will be '1' which means even if the field is not |
228 |
# Fetch the authorised value description for 942$n ( suppressed in opac ) for the value '1' |
228 |
# mapped in the framework, we will still get the correct value to compare against |
229 |
# if 942$n is not mapped, the return value will be '1' which means even if the field is not |
229 |
my $frameworkcode = GetFrameworkCode($biblionumber) || ''; |
230 |
# mapped in the framework, we will still get the correct value to compare against |
230 |
my $tagslib = &GetMarcStructure(1,$frameworkcode); |
231 |
my $frameworkcode = GetFrameworkCode($biblionumber) || ''; |
231 |
my $value = GetAuthorisedValueDesc( '942', 'n', '1', '', $tagslib ); |
232 |
my $tagslib = &GetMarcStructure(1,$frameworkcode); |
232 |
$sysxml .= "<OtherVar name=\"Field942_1_True_Value\">$value</OtherVar>"; |
233 |
my $value = GetAuthorisedValueDesc( '942', 'n', '1', '', $tagslib ); |
233 |
|
234 |
$sysxml .= "<OtherVar name=\"Field942_1_True_Value\">$value</OtherVar>"; |
234 |
$sysxml .= "</OtherVars>\n"; |
235 |
|
235 |
## End non-syspref variables that need to be computed |
236 |
$sysxml .= "</OtherVars>\n"; |
|
|
237 |
## End non-syspref variables that need to be computed |
238 |
} |
236 |
|
239 |
|
237 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; |
240 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; |
238 |
if ($fixamps) { # We need to correct the HTML entities that Zebra outputs |
241 |
if ($fixamps) { # We need to correct the HTML entities that Zebra outputs |
239 |
- |
|
|