Bugzilla – Attachment 2238 Details for
Bug 4884
opac-showmarc.pl can't find compact.xsl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-4884-opac-showmarc.pl-can-t-find-compact.patch (text/plain), 5.20 KB, created by
Owen Leonard
on 2010-06-10 17:11:03 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-06-10 17:11:03 UTC
Size:
5.20 KB
patch
obsolete
>From 44e7517acdbdb765f8c1a0e123a54d58c823e5de Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 10 Jun 2010 13:06:40 -0400 >Subject: [PATCH] Fix for Bug 4884, opac-showmarc.pl can't find compact.xsl > >This patch implements Fridolyn SOMERS' suggested change >to the .xsl file path but copies compact.xsl from the >intranet template dir and points to that instead. >--- > koha-tmpl/opac-tmpl/prog/en/xslt/compact.xsl | 86 ++++++++++++++++++++++++++ > opac/opac-showmarc.pl | 2 +- > 2 files changed, 87 insertions(+), 1 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/prog/en/xslt/compact.xsl > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/compact.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/compact.xsl >new file mode 100644 >index 0000000..43d7f53 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/compact.xsl >@@ -0,0 +1,86 @@ >+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> >+ >+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns="http://www.w3.org/1999/xhtml" >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xmlns:marc="http://www.loc.gov/MARC21/slim" >+ exclude-result-prefixes="xsi marc" >+ version="1.0"> >+ <xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> >+ <xsl:template match="/"> >+ <html> >+ <head> >+ <title>MARC Card View</title> >+ </head> >+ <body> >+ <xsl:apply-templates/> >+ </body> >+ </html> >+ </xsl:template> >+ >+ <xsl:template match="marc:record"> >+ <div class="cardimage"> >+ <xsl:apply-templates select="marc:datafield[@tag!='082' and @tag!='092' and @tag!='010']"/> >+ <span class="bottom"> >+ <xsl:apply-templates select="marc:controlfield[@tag='001']"/> >+ <xsl:apply-templates select="marc:datafield[@tag='082' or @tag='092' or @tag='010']"/> >+ </span> >+ </div> >+ </xsl:template> >+ >+ <xsl:template match="marc:controlfield"> >+ <span class="oclc">#<xsl:value-of select="substring(.,4)"/></span> >+ </xsl:template> >+ >+ <xsl:template match="marc:datafield"> >+ <xsl:if test="starts-with(@tag, '1')"> >+ <p class="mainheading"><xsl:value-of select="."/></p> >+ </xsl:if> >+ <xsl:if test="starts-with(@tag, '24') and /marc:record/marc:datafield[@tag='100']"> >+ <span class="title"><xsl:value-of select="."/></span> >+ </xsl:if> >+ <xsl:if test="starts-with(@tag, '24') and not(/marc:record/marc:datafield[@tag='100'])"> >+ <span class="titlemain"><xsl:value-of select="."/></span><br/> >+ </xsl:if> >+ <xsl:if test="@tag='260'"> >+ <xsl:value-of select="."/> >+ </xsl:if> >+ <xsl:if test="@tag='300'"> >+ <p class="extent"><xsl:value-of select="."/></p> >+ </xsl:if> >+ <xsl:if test="starts-with(@tag, '5')"> >+ <p class="note"><xsl:value-of select="."/></p> >+ </xsl:if> >+ <xsl:if test="@tag='650'"> >+ <span class='counter'><xsl:number count="marc:datafield[@tag='650']"/>.</span> <xsl:apply-templates select="marc:subfield"/> >+ </xsl:if> >+ <xsl:if test="@tag='653'"> >+ <span class="counter"><xsl:number format="i" count="marc:datafield[@tag='653']"/>.</span> <xsl:apply-templates select="marc:subfield"/> >+ </xsl:if> >+ <xsl:if test="@tag='010'"> >+ <xsl:variable name="LCCN.nospace" select="translate(., ' ', '')"/> >+ <xsl:variable name="LCCN.length" select="string-length($LCCN.nospace)"/> >+ <xsl:variable name="LCCN.display" select="concat(substring($LCCN.nospace, 1, $LCCN.length - 6), '-', format-number(substring($LCCN.nospace, $LCCN.length - 5),'#'))"/> >+ <span class="LCCN">LCCN:<xsl:value-of select="$LCCN.display"/></span> >+ </xsl:if> >+ <xsl:if test="@tag='082' or @tag='092'"> >+ <span class="DDC"><xsl:value-of select="marc:subfield[@code='a']"/></span> >+ </xsl:if> >+ <xsl:if test="@tag='856'"> >+ <br/><xsl:apply-templates mode="link" select="marc:subfield" /> >+ </xsl:if> >+ </xsl:template> >+ <xsl:template match="marc:subfield" mode="link"> >+ <xsl:if test="@code='u'"> >+ <span class="link"> >+ <a class="url" href="{.}"/> >+ </span> >+ </xsl:if> >+ </xsl:template> >+ <xsl:template match="marc:subfield"> >+ <xsl:if test="@code!='2'"> >+ <xsl:if test="@code!='a'">--</xsl:if> >+ <xsl:value-of select="."/> >+ </xsl:if> >+ </xsl:template> >+ </xsl:stylesheet> >diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl >index c2f1722..7eb934e 100755 >--- a/opac/opac-showmarc.pl >+++ b/opac/opac-showmarc.pl >@@ -64,7 +64,7 @@ if ($importid) { > > if ($view eq 'card') { > $xmlrecord = GetXmlBiblio($biblionumber) unless $xmlrecord; >-my $xslfile = C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl"; >+my $xslfile = C4::Context->config('opachtdocs')."/prog/en/xslt/compact.xsl"; > my $parser = XML::LibXML->new(); > my $xslt = XML::LibXSLT->new(); > my $source = $parser->parse_string($xmlrecord); >-- >1.7.0.4 >
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 4884
: 2238