Bugzilla – Attachment 3178 Details for
Bug 5772
Showing cards should use marcflavour (when cataloguing)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-5772-MT3113-Showing-cards-should-use-marcflavour.patch (text/plain), 4.30 KB, created by
Chris Cormack
on 2011-02-17 22:25:19 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-02-17 22:25:19 UTC
Size:
4.30 KB
patch
obsolete
>From 5eb54814cc25118ec9175a53a807c4632ed116af Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Tue, 14 Dec 2010 23:11:27 +0100 >Subject: [PATCH] Bug 5772 : MT3113 : Showing cards should use marcflavour > > filename for compact xsl is now based on marcflavour >--- > catalogue/cardview.pl | 3 ++- > catalogue/showmarc.pl | 3 ++- > .../intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl | 19 ++++++------------- > 3 files changed, 10 insertions(+), 15 deletions(-) > >diff --git a/catalogue/cardview.pl b/catalogue/cardview.pl >index f93323f..d41d7c8 100755 >--- a/catalogue/cardview.pl >+++ b/catalogue/cardview.pl >@@ -32,7 +32,8 @@ $template->param(biblionumber => $biblionumber); > my $xmlrecord = GetXmlBiblio($biblionumber); > #my $xslfile = "/home/kohacat/etc/xslt/MARC21slim2HTML.xsl"; > #my $xslfile = "/home/kohacat/etc/xslt/MARC21slim2English.xsl"; >-my $xslfile = C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl"; >+my $filename=(C4::Context->preference('marcflavour') ne "MARC21"?C4::Context->preference('marcflavour')."_":"").'compact.xsl'; >+my $xslfile = C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/$filename"; > my $parser = XML::LibXML->new(); > my $xslt = XML::LibXSLT->new(); > my $source = $parser->parse_string($xmlrecord); >diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl >index d316833..3822ab5 100755 >--- a/catalogue/showmarc.pl >+++ b/catalogue/showmarc.pl >@@ -69,7 +69,8 @@ if($importid) { > if($view eq 'card') { > $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; > >-my $xslfile = C4::Context->config('intrahtdocs')."/prog/en/xslt/compact.xsl"; >+my $filename=(C4::Context->preference('marcflavour') ne "MARC21"?C4::Context->preference('marcflavour')."_":"").'compact.xsl'; >+my $xslfile = C4::Context->config('intrahtdocs')."/prog/en/xslt/$filename"; > my $parser = XML::LibXML->new(); > my $xslt = XML::LibXSLT->new(); > my $source = $parser->parse_string($xmlrecord); >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 6e70ee7..32e92ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl >@@ -34,28 +34,21 @@ > > <xsl:template match="marc:datafield"> > <xsl:if test="starts-with(@tag, '7')"> >- <p class="mainheading"><xsl:value-of select="."/></p> >+ <p class="mainheading"> <xsl:apply-templates select="marc:subfield"/></p> > </xsl:if> > <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> > <xsl:if test="@tag='215'"> > <p class="extent"><xsl:value-of select="."/></p> > </xsl:if> >- <xsl:if test="starts-with(@tag, '3')"> >- <p class="note"><xsl:value-of select="."/></p> >- </xsl:if> >- <xsl:if test="@tag='606'"> >- <span class='counter'><xsl:number count="marc:datafield[@tag='606']"/>.</span> <xsl:apply-templates select="marc:subfield"/> >- </xsl:if> >- <xsl:if test="@tag='610'"> >- <span class="counter"><xsl:number format="i" count="marc:datafield[@tag='610']"/>.</span> <xsl:apply-templates select="marc:subfield"/> >+ <xsl:if test="substring(@tag,1,1)='6' and @tag!='680' and @tag!='676'"> >+ <p> >+ <span class='counter'><xsl:number count="marc:datafield[substring(@tag,1,1)='6']"/>.</span> <xsl:apply-templates select="marc:subfield"/> >+ </p> > </xsl:if> > <xsl:if test="@tag='680'"> > <xsl:variable name="LCCN.nospace" select="translate(marc:subfield[@code='a'], ' ', '')"/> >@@ -78,7 +71,7 @@ > </xsl:if> > </xsl:template> > <xsl:template match="marc:subfield"> >- <xsl:if test="@code!='2'"> >+ <xsl:if test="@code!='0' and @code!='1' and @code!='2' and @code!='3' and @code!='5' and @code!='6' and @code!='7' and @code!='8' and @code!='9'"> > <xsl:if test="@code!='a'">--</xsl:if> > <xsl:value-of select="."/> > </xsl:if> >-- >1.7.1 >
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 5772
: 3178