Bugzilla – Attachment 32114 Details for
Bug 12901
BiblioDefaultView doesn't do anything with NORMARC or UNIMARC XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12901: BiblioDefaultView doesn't do anything with NORMARC or UNIMARC XSLT
Bug-12901-BiblioDefaultView-doesnt-do-anything-wit.patch (text/plain), 7.42 KB, created by
Paul Poulain
on 2014-10-09 19:43:25 UTC
(
hide
)
Description:
Bug 12901: BiblioDefaultView doesn't do anything with NORMARC or UNIMARC XSLT
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2014-10-09 19:43:25 UTC
Size:
7.42 KB
patch
obsolete
>From 763997cea8cc65f946210e93dd6bd7d235faa04e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 15 Sep 2014 10:43:39 -0300 >Subject: [PATCH] Bug 12901: BiblioDefaultView doesn't do anything with NORMARC > or UNIMARC XSLT > >Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> > >http://bugs.koha-community.org/show_bug.cgi?id=9828 >--- > .../bootstrap/en/xslt/NORMARCslim2OPACResults.xsl | 17 ++++++++++++++--- > .../bootstrap/en/xslt/NORMARCslimUtils.xsl | 21 +++++++++++++++++++++ > .../bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl | 9 +++++++-- > .../bootstrap/en/xslt/UNIMARCslimUtils.xsl | 21 +++++++++++++++++++++ > 4 files changed, 63 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl >index 39b1536..52597bb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl >@@ -19,6 +19,7 @@ > <xsl:template match="marc:record"> > > <!-- System preferences --> >+ <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/> > <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/> > <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> > <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/> >@@ -286,7 +287,17 @@ > </xsl:variable> > > <!-- Tittel og ansvarsopplysninger --> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <a> >+ <xsl:attribute name="href"> >+ <xsl:call-template name="buildBiblioDefaultViewURL"> >+ <xsl:with-param name="BiblioDefaultView"> >+ <xsl:value-of select="$BiblioDefaultView"/> >+ </xsl:with-param> >+ </xsl:call-template> >+ <xsl:value-of select="$biblionumber"/> >+ </xsl:attribute> >+ <xsl:attribute name="class">title</xsl:attribute> >+ > <xsl:if test="marc:datafield[@tag=245]"> > <xsl:for-each select="marc:datafield[@tag=245]"> > <xsl:variable name="title"> >@@ -323,8 +334,8 @@ > </a> > <p> > >- <xsl:choose> >- <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]"> >+ <xsl:choose >+> <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]"> > > av > <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl >index 4a1f360..7007d96 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl >@@ -52,6 +52,27 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="buildBiblioDefaultViewURL"> >+ <xsl:param name="BiblioDefaultView"/> >+ <xsl:choose> >+ <xsl:when test="$BiblioDefaultView='normal'"> >+ <xsl:text>/cgi-bin/koha/catalogue/detail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:when test="$BiblioDefaultView='isbd'"> >+ <xsl:text>/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:when test="$BiblioDefaultView='labeled_marc'"> >+ <xsl:text>/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:when test="$BiblioDefaultView='marc'"> >+ <xsl:text>/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>/cgi-bin/koha/catalogue/detail.pl?biblionumber=</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:template> >+ > <xsl:template name="chopPunctuation"> > <xsl:param name="chopString"/> > <xsl:variable name="length" select="string-length($chopString)"/> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >index 5c9c88e..d72ad3f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >@@ -25,7 +25,7 @@ > select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/> > <xsl:variable name="isbn" > select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/> >- >+ <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/> > <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> > <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/> > <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> >@@ -41,9 +41,14 @@ > select="translate($title, 'ˆ‰˜œ','')"/> > <a> > <xsl:attribute name="href"> >- <xsl:text>/cgi-bin/koha/opac-detail.pl?biblionumber=</xsl:text> >+ <xsl:call-template name="buildBiblioDefaultViewURL"> >+ <xsl:with-param name="BiblioDefaultView"> >+ <xsl:value-of select="$BiblioDefaultView"/> >+ </xsl:with-param> >+ </xsl:call-template> > <xsl:value-of select="$biblionumber"/> > </xsl:attribute> >+ <xsl:attribute name="class">title</xsl:attribute> > <xsl:value-of select="$ntitle" /> > </a> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >index fc4faa1..285454e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >@@ -57,6 +57,27 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="buildBiblioDefaultViewURL"> >+ <xsl:param name="BiblioDefaultView"/> >+ <xsl:choose> >+ <xsl:when test="$BiblioDefaultView='normal'"> >+ <xsl:text>/cgi-bin/koha/catalogue/detail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:when test="$BiblioDefaultView='isbd'"> >+ <xsl:text>/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:when test="$BiblioDefaultView='labeled_marc'"> >+ <xsl:text>/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:when test="$BiblioDefaultView='marc'"> >+ <xsl:text>/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=</xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>/cgi-bin/koha/catalogue/detail.pl?biblionumber=</xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:template> >+ > <xsl:template name="chopPunctuation"> > <xsl:param name="chopString"/> > <xsl:variable name="length" select="string-length($chopString)"/> >-- >1.9.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 12901
:
31610
|
31611
|
32114
|
32115
|
32869
|
32879
|
32880
|
32881