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