Bug 13225: Z39.50 result Card View doesn't work for UNIMARC
This patch fix UNIMARC Card View on Z39.50 result page. The valid XSL was there: UNIMARC_compact.xml, but were not selected (a regression). This patch use themelanguage to access XSL file, anticipating a intranet new theme in future. TO TEST: Before applying this patch, do a Z39.50 search, and try to display a biblio record card view: meaningless. Retry after applying this patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested in a UNIMARC installation, works as described. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
aca2069302
commit
5bcaa91001
2 changed files with 8 additions and 12 deletions
|
@ -55,15 +55,14 @@ if(!ref $record) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($view eq 'card') {
|
if($view eq 'card') {
|
||||||
my $themelang = '/' . C4::Languages::getlanguage($input);
|
my $xml = $importid ? $record->as_xml(): GetXmlBiblio($biblionumber);
|
||||||
my $xmlrecord= $importid? $record->as_xml(): GetXmlBiblio($biblionumber);
|
my $xsl = C4::Context->preference('marcflavour') eq 'UNIMARC'
|
||||||
my $xslfile =
|
? 'UNIMARC_compact.xsl' : 'compact.xsl';
|
||||||
C4::Context->config('intrahtdocs') . '/prog' . $themelang . "/xslt/compact.xsl";
|
my $htdocs = C4::Context->config('intrahtdocs');
|
||||||
if ( ! -f $xslfile && $themelang ne '/en' ) {
|
my ($theme, $lang) = C4::Templates::themelanguage($htdocs, $xsl, 'intranet', $input);
|
||||||
$xslfile=~s#$themelang#/en#;
|
$xsl = "$htdocs/$theme/$lang/xslt/$xsl";
|
||||||
}
|
print $input->header(-charset => 'UTF-8'),
|
||||||
my $newxmlrecord = C4::XSLT::engine->transform($xmlrecord, $xslfile);
|
Encode::encode_utf8(C4::XSLT::engine->transform($xml, $xsl));
|
||||||
print $input->header(-charset => 'UTF-8'), Encode::encode_utf8($newxmlrecord);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
<xsl:if test="@tag='200'">
|
<xsl:if test="@tag='200'">
|
||||||
<span class="title"><xsl:value-of select="."/></span>
|
<span class="title"><xsl:value-of select="."/></span>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="@tag='200'">
|
|
||||||
<span class="titlemain"><xsl:value-of select="."/></span><br/>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@tag='205'">
|
<xsl:if test="@tag='205'">
|
||||||
<xsl:value-of select="."/>
|
<xsl:value-of select="."/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
Loading…
Reference in a new issue