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