Lines 34-39
use Koha::ItemTypes;
Link Here
|
34 |
use Koha::XSLT::Base; |
34 |
use Koha::XSLT::Base; |
35 |
use Koha::Libraries; |
35 |
use Koha::Libraries; |
36 |
|
36 |
|
|
|
37 |
use XML::LibXML; |
38 |
|
37 |
use Encode; |
39 |
use Encode; |
38 |
|
40 |
|
39 |
use vars qw(@ISA @EXPORT); |
41 |
use vars qw(@ISA @EXPORT); |
Lines 48-53
BEGIN {
Link Here
|
48 |
@ISA = qw(Exporter); |
50 |
@ISA = qw(Exporter); |
49 |
@EXPORT = qw( |
51 |
@EXPORT = qw( |
50 |
&XSLTParse4Display |
52 |
&XSLTParse4Display |
|
|
53 |
&CustomXSLTExportList |
51 |
); |
54 |
); |
52 |
$engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } ); |
55 |
$engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } ); |
53 |
} |
56 |
} |
Lines 160-165
sub _get_best_default_xslt_filename {
Link Here
|
160 |
return $xslfilename; |
163 |
return $xslfilename; |
161 |
} |
164 |
} |
162 |
|
165 |
|
|
|
166 |
=head2 get_xslt_sysprefs |
167 |
|
168 |
returns XML xslt sysprefs. |
169 |
|
170 |
=cut |
171 |
|
163 |
sub get_xslt_sysprefs { |
172 |
sub get_xslt_sysprefs { |
164 |
my $sysxml = "<sysprefs>\n"; |
173 |
my $sysxml = "<sysprefs>\n"; |
165 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
174 |
foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow |
Lines 190-202
sub get_xslt_sysprefs {
Link Here
|
190 |
} |
199 |
} |
191 |
|
200 |
|
192 |
sub XSLTParse4Display { |
201 |
sub XSLTParse4Display { |
193 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $variables ) = @_; |
202 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang) = @_; |
194 |
|
203 |
|
195 |
$sysxml ||= C4::Context->preference($xslsyspref); |
204 |
$sysxml ||= C4::Context->preference($xslsyspref); |
196 |
$xslfilename ||= C4::Context->preference($xslsyspref); |
205 |
$xslfilename ||= C4::Context->preference($xslsyspref); |
197 |
$lang ||= C4::Languages::getlanguage(); |
206 |
$lang ||= C4::Languages::getlanguage(); |
198 |
|
207 |
|
199 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
208 |
if ($xslsyspref eq "XSLTCustomExport") { |
|
|
209 |
my $dir; |
210 |
$dir = C4::Context->config('intrahtdocs') . |
211 |
'/' . C4::Context->preference("template") . |
212 |
'/' . C4::Languages::getlanguage() . |
213 |
'/xslt/biblioexport'; |
214 |
$xslfilename = $dir . "/" . $xslfilename; |
215 |
} elsif ($xslsyspref eq "OPACXSLTCustomExport") { |
216 |
my $dir; |
217 |
$dir = C4::Context->config('opachtdocs') . |
218 |
'/' . C4::Context->preference("opacthemes") . |
219 |
'/' . C4::Languages::getlanguage() . |
220 |
'/xslt/biblioexport'; |
221 |
$xslfilename = $dir . "/" . $xslfilename; |
222 |
} elsif( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
200 |
my $htdocs; |
223 |
my $htdocs; |
201 |
my $theme; |
224 |
my $theme; |
202 |
my $xslfile; |
225 |
my $xslfile; |
Lines 250-256
sub XSLTParse4Display {
Link Here
|
250 |
} |
273 |
} |
251 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
274 |
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); |
252 |
|
275 |
|
253 |
$variables ||= {}; |
276 |
my $variables ||= {}; |
254 |
if (C4::Context->preference('OPACShowOpenURL')) { |
277 |
if (C4::Context->preference('OPACShowOpenURL')) { |
255 |
my @biblio_itemtypes; |
278 |
my @biblio_itemtypes; |
256 |
my $biblio = Koha::Biblios->find($biblionumber); |
279 |
my $biblio = Koha::Biblios->find($biblionumber); |