Bugzilla – Attachment 11378 Details for
Bug 8513
OPAC detail page broken with XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (all MARC)
Bug-8513-OPAC-detail-page-broken-with-XSLT.patch (text/plain), 8.93 KB, created by
Fridolin Somers
on 2012-08-06 10:05:16 UTC
(
hide
)
Description:
Proposed patch (all MARC)
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2012-08-06 10:05:16 UTC
Size:
8.93 KB
patch
obsolete
>From d6842ec0ee2c7b713bf8119159e9cf3c35611bd2 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Mon, 30 Jul 2012 14:36:33 +0200 >Subject: [PATCH] Bug 8513: OPAC detail page broken with XSLT > >--- > .../opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 46 ++++++++++---------- > .../opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl | 46 ++++++++++---------- > .../opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 18 ++++++-- > 3 files changed, 63 insertions(+), 47 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index c39ca39..8a7d511 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -140,29 +140,31 @@ > </xsl:if> > </xsl:for-each> > </xsl:variable> >- <xsl:choose> >- <xsl:when test="boolean($bibno)"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$bibno"/></xsl:attribute> >- <xsl:value-of select="$str"/> >- </a> >- </xsl:when> >- <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >- <xsl:value-of select="$str"/> >- </a> >- </xsl:when> >- <xsl:when test="boolean($index)"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >+ <xsl:if test="string-length($str) > 0"> >+ <xsl:choose> >+ <xsl:when test="boolean($bibno)"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$bibno"/></xsl:attribute> >+ <xsl:value-of select="$str"/> >+ </a> >+ </xsl:when> >+ <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <xsl:value-of select="$str"/> >+ </a> >+ </xsl:when> >+ <xsl:when test="boolean($index)"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >+ <xsl:value-of select="$str"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> > <xsl:value-of select="$str"/> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <xsl:value-of select="$str"/> >- </xsl:otherwise> >- </xsl:choose> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:if> > </span> > </xsl:if> > </xsl:for-each> >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl >index 91a0437..13cff4f 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl >@@ -170,29 +170,31 @@ > </xsl:if> > </xsl:for-each> > </xsl:variable> >- <xsl:choose> >- <xsl:when test="boolean($bibno)"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$bibno"/></xsl:attribute> >+ <xsl:if test="string-length($str) > 0"> >+ <xsl:choose> >+ <xsl:when test="boolean($bibno)"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$bibno"/></xsl:attribute> >+ <xsl:value-of select="$str"/> >+ </a> >+ </xsl:when> >+ <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >+ <xsl:value-of select="$str"/> >+ </a> >+ </xsl:when> >+ <xsl:when test="boolean($index)"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >+ <xsl:value-of select="$str"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> > <xsl:value-of select="$str"/> >- </a> >- </xsl:when> >- <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >- <xsl:value-of select="$str"/> >- </a> >- </xsl:when> >- <xsl:when test="boolean($index)"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="$index"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> >- <xsl:value-of select="$str"/> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <xsl:value-of select="$str"/> >- </xsl:otherwise> >- </xsl:choose> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:if> > </span> > </xsl:if> > </xsl:for-each> >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl >index 146b88c..32f8cde 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl >@@ -244,7 +244,18 @@ > <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text> > <xsl:value-of select="."/> > </xsl:attribute> >- <xsl:value-of select="$display"/> >+ <xsl:choose> >+ <xsl:when test="string-length($display) > 0"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:value-of select="$display"/> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="."/> >+ </xsl:otherwise> >+ </xsl:choose> > </a> > <xsl:variable name="ncommas" > select="string-length($ends) - string-length(translate($ends, ',', ''))" /> >@@ -254,7 +265,7 @@ > </xsl:if> > </xsl:for-each> > </xsl:when> >- <xsl:otherwise> >+ <xsl:when test="marc:subfield[@code=a]"> > <a> > <xsl:attribute name="href"> > <xsl:text>/cgi-bin/koha/opac-search.pl?q=su:</xsl:text> >@@ -270,7 +281,8 @@ > </xsl:with-param> > </xsl:call-template> > </a> >- </xsl:otherwise> >+ </xsl:when> >+ <xsl:otherwise/> > </xsl:choose> > <xsl:if test="not(position()=last())"> > <xsl:text> | </xsl:text> >-- >1.7.9.5 >
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 8513
:
11158
|
11191
|
11378
|
11478