Bugzilla – Attachment 33386 Details for
Bug 13225
Z39.50 result Card View doesn't work for UNIMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13225 Z39.50 result Card View doesn't work for UNIMARC
Bug-13225-Z3950-result-Card-View-doesnt-work-for-U.patch (text/plain), 2.74 KB, created by
Frédéric Demians
on 2014-11-07 18:13:28 UTC
(
hide
)
Description:
Bug 13225 Z39.50 result Card View doesn't work for UNIMARC
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2014-11-07 18:13:28 UTC
Size:
2.74 KB
patch
obsolete
>From 3b8bf4f92200910638a95d1d2cc08f13c249edaf Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Fri, 7 Nov 2014 19:23:12 +0100 >Subject: [PATCH] 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. >--- > catalogue/showmarc.pl | 17 ++++++++--------- > .../intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl | 3 --- > 2 files changed, 8 insertions(+), 12 deletions(-) > >diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl >index 2c690fc..97bc6fe 100755 >--- a/catalogue/showmarc.pl >+++ b/catalogue/showmarc.pl >@@ -55,15 +55,14 @@ if(!ref $record) { > } > > if($view eq 'card') { >- my $themelang = '/' . C4::Languages::getlanguage($input); >- my $xmlrecord= $importid? $record->as_xml(): GetXmlBiblio($biblionumber); >- my $xslfile = >- C4::Context->config('intrahtdocs') . '/prog' . $themelang . "/xslt/compact.xsl"; >- if ( ! -f $xslfile && $themelang ne '/en' ) { >- $xslfile=~s#$themelang#/en#; >- } >- my $newxmlrecord = C4::XSLT::engine->transform($xmlrecord, $xslfile); >- print $input->header(-charset => 'UTF-8'), Encode::encode_utf8($newxmlrecord); >+ my $xml = $importid ? $record->as_xml(): GetXmlBiblio($biblionumber); >+ my $xsl = C4::Context->preference('marcflavour') eq 'UNIMARC' >+ ? 'UNIMARC_compact.xsl' : 'compact.xsl'; >+ my $htdocs = C4::Context->config('intrahtdocs'); >+ my ($theme, $lang) = C4::Templates::themelanguage($htdocs, $xsl, 'intranet', $input); >+ $xsl = "$htdocs/$theme/$lang/xslt/$xsl"; >+ print $input->header(-charset => 'UTF-8'), >+ Encode::encode_utf8(C4::XSLT::engine->transform($xml, $xsl)); > } > else { > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl >index 32e8aec..50681b4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl >@@ -41,9 +41,6 @@ > <xsl:if test="@tag='200'"> > <span class="title"><xsl:value-of select="."/></span> > </xsl:if> >- <xsl:if test="@tag='200'"> >- <span class="titlemain"><xsl:value-of select="."/></span><br/> >- </xsl:if> > <xsl:if test="@tag='205'"> > <xsl:value-of select="."/> > </xsl:if> >-- >2.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13225
:
33386
|
33387
|
33388
|
33392
|
33394