Lines 42-47
BEGIN {
Link Here
|
42 |
$VERSION = 3.07.00.049; |
42 |
$VERSION = 3.07.00.049; |
43 |
@ISA = qw(Exporter); |
43 |
@ISA = qw(Exporter); |
44 |
@EXPORT = qw( |
44 |
@EXPORT = qw( |
|
|
45 |
&XSLTGetFilename |
45 |
&XSLTParse4Display |
46 |
&XSLTParse4Display |
46 |
&GetURI |
47 |
&GetURI |
47 |
); |
48 |
); |
Lines 156-188
sub _get_best_default_xslt_filename {
Link Here
|
156 |
return $xslfilename; |
157 |
return $xslfilename; |
157 |
} |
158 |
} |
158 |
|
159 |
|
159 |
sub XSLTParse4Display { |
160 |
sub XSLTGetFilename { |
160 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_; |
161 |
my ( $marcflavour, $xslsyspref ) = @_; |
161 |
my $xslfilename = C4::Context->preference($xslsyspref); |
162 |
|
|
|
163 |
my $xslfilename = $marcflavour eq C4::Context->preference('marcflavour') ? C4::Context->preference($xslsyspref) : 'default'; |
162 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
164 |
if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { |
163 |
my $htdocs; |
165 |
my $htdocs; |
164 |
my $theme; |
166 |
my $theme; |
165 |
my $lang = C4::Templates::_current_language(); |
167 |
my $lang = C4::Templates::_current_language(); |
166 |
my $xslfile; |
168 |
my $xslfile; |
167 |
if ($xslsyspref eq "XSLTDetailsDisplay") { |
169 |
if ($xslsyspref eq "XSLTDetailsDisplay") { |
168 |
$htdocs = C4::Context->config('intrahtdocs'); |
170 |
$htdocs = C4::Context->config('intrahtdocs'); |
169 |
$theme = C4::Context->preference("template"); |
171 |
$theme = C4::Context->preference("template"); |
170 |
$xslfile = C4::Context->preference('marcflavour') . |
172 |
$xslfile = $marcflavour . |
171 |
"slim2intranetDetail.xsl"; |
173 |
"slim2intranetDetail.xsl"; |
172 |
} elsif ($xslsyspref eq "XSLTResultsDisplay") { |
174 |
} elsif ($xslsyspref eq "XSLTResultsDisplay") { |
173 |
$htdocs = C4::Context->config('intrahtdocs'); |
175 |
$htdocs = C4::Context->config('intrahtdocs'); |
174 |
$theme = C4::Context->preference("template"); |
176 |
$theme = C4::Context->preference("template"); |
175 |
$xslfile = C4::Context->preference('marcflavour') . |
177 |
$xslfile = $marcflavour . |
176 |
"slim2intranetResults.xsl"; |
178 |
"slim2intranetResults.xsl"; |
177 |
} elsif ($xslsyspref eq "OPACXSLTDetailsDisplay") { |
179 |
} elsif ($xslsyspref eq "OPACXSLTDetailsDisplay") { |
178 |
$htdocs = C4::Context->config('opachtdocs'); |
180 |
$htdocs = C4::Context->config('opachtdocs'); |
179 |
$theme = C4::Context->preference("opacthemes"); |
181 |
$theme = C4::Context->preference("opacthemes"); |
180 |
$xslfile = C4::Context->preference('marcflavour') . |
182 |
$xslfile = $marcflavour . |
181 |
"slim2OPACDetail.xsl"; |
183 |
"slim2OPACDetail.xsl"; |
182 |
} elsif ($xslsyspref eq "OPACXSLTResultsDisplay") { |
184 |
} elsif ($xslsyspref eq "OPACXSLTResultsDisplay") { |
183 |
$htdocs = C4::Context->config('opachtdocs'); |
185 |
$htdocs = C4::Context->config('opachtdocs'); |
184 |
$theme = C4::Context->preference("opacthemes"); |
186 |
$theme = C4::Context->preference("opacthemes"); |
185 |
$xslfile = C4::Context->preference('marcflavour') . |
187 |
$xslfile = $marcflavour . |
186 |
"slim2OPACResults.xsl"; |
188 |
"slim2OPACResults.xsl"; |
187 |
} |
189 |
} |
188 |
$xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile); |
190 |
$xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile); |
Lines 193-198
sub XSLTParse4Display {
Link Here
|
193 |
$xslfilename =~ s/\{langcode\}/$lang/; |
195 |
$xslfilename =~ s/\{langcode\}/$lang/; |
194 |
} |
196 |
} |
195 |
|
197 |
|
|
|
198 |
return $xslfilename; |
199 |
} |
200 |
|
201 |
sub XSLTParse4Display { |
202 |
my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_; |
203 |
my $xslfilename = XSLTGetFilename( C4::Context->preference( 'marcflavour' ), $xslsyspref ); |
204 |
|
196 |
# grab the XML, run it through our stylesheet, push it out to the browser |
205 |
# grab the XML, run it through our stylesheet, push it out to the browser |
197 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
206 |
my $record = transformMARCXML4XSLT($biblionumber, $orig_record); |
198 |
#return $record->as_formatted(); |
207 |
#return $record->as_formatted(); |