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