Bugzilla – Attachment 3406 Details for
Bug 3098
XSLT stylesheet does not obey OPACURLOpenInNewWindow syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-SIGNED-OFF-Bug-3098-follow-up-Clean-up-formatting.patch (text/plain), 6.11 KB, created by
Nicole C. Engard
on 2011-03-22 21:33:53 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-03-22 21:33:53 UTC
Size:
6.11 KB
patch
obsolete
>From 2277e0731e05695800e0ec938a669792a8dbd5ba Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@bywatersolutions.com> >Date: Mon, 21 Mar 2011 14:27:44 -0400 >Subject: [PATCH 1/2] [SIGNED-OFF] Bug 3098 follow-up: Clean up formatting > >This patch cleans up the formatting of the 856 display code in >MARC21slim2OPACDetail.xsl. Tabstops are correct, and the OPACURLOpenInNewWindow >syspref check is moved to control the use of a 'target="_blank"' attribute, >rather than having two blocks of almost-identical code. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 77 ++++++++------------ > 1 files changed, 29 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index b5e60b9..37c5501 100755 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >@@ -504,59 +504,40 @@ > <xsl:if test="marc:datafield[@tag=856]"> > <span class="results_summary"><span class="label">Online Resources: </span> > <xsl:for-each select="marc:datafield[@tag=856]"> >- <xsl:if test="$OPACURLOpenInNewWindow='0'"> >- <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">y3z</xsl:with-param> >- </xsl:call-template> >- </xsl:when> >- <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])"> >- <xsl:choose> >- <xsl:when test="$URLLinkText!=''"> >- <xsl:value-of select="$URLLinkText"/> >- </xsl:when> >- <xsl:otherwise> >- <xsl:text>Click here to access online</xsl:text> >- </xsl:otherwise> >- </xsl:choose> >- </xsl:when> >- </xsl:choose> >- </a> >- </xsl:if> >- <xsl:if test="$OPACURLOpenInNewWindow='1'"> >- <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">y3z</xsl:with-param> >- </xsl:call-template> >- </xsl:when> >- <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])"> >- <xsl:choose> >- <xsl:when test="$URLLinkText!=''"> >- <xsl:value-of select="$URLLinkText"/> >- </xsl:when> >- <xsl:otherwise> >- <xsl:text>Click here to access online</xsl:text> >- </xsl:otherwise> >- </xsl:choose> >- </xsl:when> >- </xsl:choose> >- </a> >- </xsl:if> >- <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >- <xsl:otherwise> | </xsl:otherwise> >- </xsl:choose> >- >+ <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >+ <xsl:if test="$OPACURLOpenInNewWindow='1'"> >+ <xsl:attribute name="target">_blank</xsl:attribute> >+ </xsl:if> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">y3z</xsl:with-param> >+ </xsl:call-template> >+ </xsl:when> >+ <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])"> >+ <xsl:choose> >+ <xsl:when test="$URLLinkText!=''"> >+ <xsl:value-of select="$URLLinkText"/> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>Click here to access online</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:when> >+ </xsl:choose> >+ </a> >+ <xsl:choose> >+ <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when> >+ <xsl:otherwise> | </xsl:otherwise> >+ </xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >+ >+ <!-- 505 --> > <xsl:if test="marc:datafield[@tag=505]"> > <xsl:for-each select="marc:datafield[@tag=505]"> >- <span class="results_summary"> >+ <span class="results_summary contents"> > <xsl:choose> > <xsl:when test="@ind1=1"> > <span class="label">Incomplete contents:</span> >-- >1.7.2.3 >
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 3098
: 3406