Lines 31-36
use Koha::ItemTypes;
Link Here
|
31 |
use Koha::XSLT::Base; |
31 |
use Koha::XSLT::Base; |
32 |
use Koha::Libraries; |
32 |
use Koha::Libraries; |
33 |
|
33 |
|
|
|
34 |
|
35 |
use XML::LibXML; |
36 |
|
37 |
use Encode; |
38 |
|
39 |
use vars qw(@ISA @EXPORT); |
40 |
|
41 |
|
34 |
my $engine; #XSLT Handler object |
42 |
my $engine; #XSLT Handler object |
35 |
my %authval_per_framework; |
43 |
my %authval_per_framework; |
36 |
# Cache for tagfield-tagsubfield to decode per framework. |
44 |
# Cache for tagfield-tagsubfield to decode per framework. |
Lines 45-50
BEGIN {
Link Here
|
45 |
getAuthorisedValues4MARCSubfields |
53 |
getAuthorisedValues4MARCSubfields |
46 |
buildKohaItemsNamespace |
54 |
buildKohaItemsNamespace |
47 |
XSLTParse4Display |
55 |
XSLTParse4Display |
|
|
56 |
&CustomXSLTExportList |
48 |
); |
57 |
); |
49 |
$engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } ); |
58 |
$engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } ); |
50 |
} |
59 |
} |
Lines 156-161
sub _get_best_default_xslt_filename {
Link Here
|
156 |
return $xslfilename; |
165 |
return $xslfilename; |
157 |
} |
166 |
} |
158 |
|
167 |
|
|
|
168 |
=head2 get_xslt_sysprefs |
169 |
|
170 |
returns XML xslt sysprefs. |
171 |
|
172 |
=cut |
173 |
|
159 |
sub get_xslt_sysprefs { |
174 |
sub get_xslt_sysprefs { |
160 |
my $sysxml = "<sysprefs>\n"; |
175 |
my $sysxml = "<sysprefs>\n"; |
161 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
176 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
Lines 193-199
sub get_xsl_filename {
Link Here
|
193 |
|
208 |
|
194 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
209 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
195 |
|
210 |
|
196 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
211 |
if ($xslsyspref eq "XSLTCustomExport") { |
|
|
212 |
my $dir; |
213 |
$dir = C4::Context->config('intrahtdocs') . |
214 |
'/' . C4::Context->preference("template") . |
215 |
'/' . C4::Languages::getlanguage() . |
216 |
'/xslt/biblioexport'; |
217 |
$xslfilename = $dir . "/" . $xslfilename; |
218 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
219 |
my $dir; |
220 |
$dir = C4::Context->config('opachtdocs') . |
221 |
'/' . C4::Context->preference("opacthemes") . |
222 |
'/' . C4::Languages::getlanguage() . |
223 |
'/xslt/biblioexport'; |
224 |
$xslfilename = $dir . "/" . $xslfilename; |
225 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
197 |
|
226 |
|
198 |
my ( $htdocs, $theme, $xslfile ); |
227 |
my ( $htdocs, $theme, $xslfile ); |
199 |
|
228 |
|
Lines 266-273
sub XSLTParse4Display {
Link Here
|
266 |
} |
295 |
} |
267 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
296 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
268 |
|
297 |
|
269 |
$variables ||= {}; |
|
|
270 |
my $biblio; |
298 |
my $biblio; |
|
|
299 |
my $variables ||= {}; |
300 |
|
271 |
if (C4::Context->preference('OPACShowOpenURL')) { |
301 |
if (C4::Context->preference('OPACShowOpenURL')) { |
272 |
my @biblio_itemtypes; |
302 |
my @biblio_itemtypes; |
273 |
$biblio //= Koha::Biblios->find($biblionumber); |
303 |
$biblio //= Koha::Biblios->find($biblionumber); |