Lines 156-168
sub _get_best_default_xslt_filename {
Link Here
|
156 |
return $xslfilename; |
156 |
return $xslfilename; |
157 |
} |
157 |
} |
158 |
|
158 |
|
|
|
159 |
sub _get_xslt_sysprefs { |
160 |
my $sysxml = "<sysprefs>\n"; |
161 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
162 |
DisplayOPACiconsXSLT URLLinkText viewISBD |
163 |
OPACBaseURL TraceCompleteSubfields UseICU |
164 |
UseAuthoritiesForTracings TraceSubjectSubdivisions |
165 |
Display856uAsImage OPACDisplay856uAsImage |
166 |
UseControlNumber IntranetBiblioDefaultView BiblioDefaultView |
167 |
singleBranchMode OPACItemLocation DisplayIconsXSLT |
168 |
AlternateHoldingsField AlternateHoldingsSeparator |
169 |
TrackClicks opacthemes IdRef / ) |
170 |
{ |
171 |
my $sp = C4::Context->preference( $syspref ); |
172 |
next unless defined($sp); |
173 |
$sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n"; |
174 |
} |
175 |
$sysxml .= "</sysprefs>\n"; |
176 |
return $sysxml; |
177 |
} |
178 |
|
159 |
sub XSLTParse4Display { |
179 |
sub XSLTParse4Display { |
160 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_; |
180 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang ) = @_; |
161 |
my $xslfilename = C4::Context->preference($xslsyspref); |
181 |
#my $xslfilename = C4::Context->preference($xslsyspref); |
162 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
182 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
163 |
my $htdocs; |
183 |
my $htdocs; |
164 |
my $theme; |
184 |
my $theme; |
165 |
my $lang = C4::Languages::getlanguage(); |
185 |
# my $lang = C4::Languages::getlanguage(); |
166 |
my $xslfile; |
186 |
my $xslfile; |
167 |
if ($xslsyspref eq "XSLTDetailsDisplay") { |
187 |
if ($xslsyspref eq "XSLTDetailsDisplay") { |
168 |
$htdocs = C4::Context->config('intrahtdocs'); |
188 |
$htdocs = C4::Context->config('intrahtdocs'); |
Lines 197-218
sub XSLTParse4Display {
Link Here
|
197 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
217 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
198 |
my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); |
218 |
my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); |
199 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
219 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
200 |
my $sysxml = "<sysprefs>\n"; |
220 |
# my $sysxml = "<sysprefs>\n"; |
201 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
221 |
# foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
202 |
DisplayOPACiconsXSLT URLLinkText viewISBD |
222 |
# DisplayOPACiconsXSLT URLLinkText viewISBD |
203 |
OPACBaseURL TraceCompleteSubfields UseICU |
223 |
# OPACBaseURL TraceCompleteSubfields UseICU |
204 |
UseAuthoritiesForTracings TraceSubjectSubdivisions |
224 |
# UseAuthoritiesForTracings TraceSubjectSubdivisions |
205 |
Display856uAsImage OPACDisplay856uAsImage |
225 |
# Display856uAsImage OPACDisplay856uAsImage |
206 |
UseControlNumber IntranetBiblioDefaultView BiblioDefaultView |
226 |
# UseControlNumber IntranetBiblioDefaultView BiblioDefaultView |
207 |
singleBranchMode OPACItemLocation DisplayIconsXSLT |
227 |
# singleBranchMode OPACItemLocation DisplayIconsXSLT |
208 |
AlternateHoldingsField AlternateHoldingsSeparator |
228 |
# AlternateHoldingsField AlternateHoldingsSeparator |
209 |
TrackClicks opacthemes IdRef / ) |
229 |
# TrackClicks opacthemes IdRef / ) |
210 |
{ |
230 |
# { |
211 |
my $sp = C4::Context->preference( $syspref ); |
231 |
# my $sp = C4::Context->preference( $syspref ); |
212 |
next unless defined($sp); |
232 |
# next unless defined($sp); |
213 |
$sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n"; |
233 |
# $sysxml .= "<syspref name=\"$syspref\">$sp</syspref>\n"; |
214 |
} |
234 |
# } |
215 |
$sysxml .= "</sysprefs>\n"; |
235 |
# $sysxml .= "</sysprefs>\n"; |
216 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; |
236 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; |
217 |
if ($fixamps) { # We need to correct the HTML entities that Zebra outputs |
237 |
if ($fixamps) { # We need to correct the HTML entities that Zebra outputs |
218 |
$xmlrecord =~ s/\&amp;/\&/g; |
238 |
$xmlrecord =~ s/\&amp;/\&/g; |
219 |
- |
|
|