|
Lines 33-38
use Koha::XSLT::Base;
Link Here
|
| 33 |
use Koha::Libraries; |
33 |
use Koha::Libraries; |
| 34 |
use Koha::Recalls; |
34 |
use Koha::Recalls; |
| 35 |
|
35 |
|
|
|
36 |
|
| 37 |
use XML::LibXML; |
| 38 |
|
| 39 |
use Encode; |
| 40 |
|
| 41 |
use vars qw(@ISA @EXPORT); |
| 42 |
|
| 43 |
|
| 36 |
my $engine; #XSLT Handler object |
44 |
my $engine; #XSLT Handler object |
| 37 |
|
45 |
|
| 38 |
our (@ISA, @EXPORT_OK); |
46 |
our (@ISA, @EXPORT_OK); |
|
Lines 42-47
BEGIN {
Link Here
|
| 42 |
@EXPORT_OK = qw( |
50 |
@EXPORT_OK = qw( |
| 43 |
buildKohaItemsNamespace |
51 |
buildKohaItemsNamespace |
| 44 |
XSLTParse4Display |
52 |
XSLTParse4Display |
|
|
53 |
&CustomXSLTExportList |
| 45 |
); |
54 |
); |
| 46 |
$engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } ); |
55 |
$engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } ); |
| 47 |
} |
56 |
} |
|
Lines 84-89
sub _get_best_default_xslt_filename {
Link Here
|
| 84 |
return $xslfilename; |
93 |
return $xslfilename; |
| 85 |
} |
94 |
} |
| 86 |
|
95 |
|
|
|
96 |
=head2 get_xslt_sysprefs |
| 97 |
|
| 98 |
returns XML xslt sysprefs. |
| 99 |
|
| 100 |
=cut |
| 101 |
|
| 87 |
sub get_xslt_sysprefs { |
102 |
sub get_xslt_sysprefs { |
| 88 |
my $sysxml = "<sysprefs>\n"; |
103 |
my $sysxml = "<sysprefs>\n"; |
| 89 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
104 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
|
Lines 121-127
sub get_xsl_filename {
Link Here
|
| 121 |
|
136 |
|
| 122 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
137 |
my $xslfilename = C4::Context->preference($xslsyspref) || "default"; |
| 123 |
|
138 |
|
| 124 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
139 |
if ($xslsyspref eq "XSLTCustomExport") { |
|
|
140 |
my $dir; |
| 141 |
$dir = C4::Context->config('intrahtdocs') . |
| 142 |
'/' . C4::Context->preference("template") . |
| 143 |
'/' . C4::Languages::getlanguage() . |
| 144 |
'/xslt/biblioexport'; |
| 145 |
$xslfilename = $dir . "/" . $xslfilename; |
| 146 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
| 147 |
my $dir; |
| 148 |
$dir = C4::Context->config('opachtdocs') . |
| 149 |
'/' . C4::Context->preference("opacthemes") . |
| 150 |
'/' . C4::Languages::getlanguage() . |
| 151 |
'/xslt/biblioexport'; |
| 152 |
$xslfilename = $dir . "/" . $xslfilename; |
| 153 |
} elsif ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
| 125 |
|
154 |
|
| 126 |
my ( $htdocs, $theme, $xslfile ); |
155 |
my ( $htdocs, $theme, $xslfile ); |
| 127 |
|
156 |
|
|
Lines 206-214
sub XSLTParse4Display {
Link Here
|
| 206 |
} |
235 |
} |
| 207 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
236 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
| 208 |
|
237 |
|
| 209 |
$variables ||= {}; |
|
|
| 210 |
my $biblio; |
238 |
my $biblio; |
| 211 |
if ( $interface eq 'opac' && C4::Context->preference('OPACShowOpenURL')) { |
239 |
my $variables ||= {}; |
|
|
240 |
|
| 241 |
if (C4::Context->preference('OPACShowOpenURL')) { |
| 212 |
my @biblio_itemtypes; |
242 |
my @biblio_itemtypes; |
| 213 |
$biblio //= Koha::Biblios->find($biblionumber); |
243 |
$biblio //= Koha::Biblios->find($biblionumber); |
| 214 |
if (C4::Context->preference('item-level_itypes')) { |
244 |
if (C4::Context->preference('item-level_itypes')) { |