Bug 10571 - IntranetBiblioDefaultView doesn't do anything with MARC21 XSLT
authorOwen Leonard <oleonard@myacpl.org>
Mon, 14 Jul 2014 17:07:42 +0000 (13:07 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Sun, 14 Sep 2014 05:02:50 +0000 (02:02 -0300)
The staff client's XSLT results view does not respect the choice set in
the IntranetBiblioDefaultView system preference. This patch adds a check
of the preference to the staff client's results view for MARC21.

To test you must have the staff client configured to use the XSLT view
for search results. Perform any search and test the link to a title's
detail page. Switching the value of the IntranetBiblioDefaultView
preference should be correctly reflected in the search results links.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors.

Only for MARC21 :(

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl

index 3be0d64..e27419d 100644 (file)
@@ -27,6 +27,7 @@
         <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
         <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
         <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
+        <xsl:variable name="IntranetBiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='IntranetBiblioDefaultView']"/>
         <xsl:variable name="leader" select="marc:leader"/>
         <xsl:variable name="leader6" select="substring($leader,7,1)"/>
         <xsl:variable name="leader7" select="substring($leader,8,1)"/>
            </xsl:call-template>
         </xsl:if>
 
-       <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute><xsl:attribute name="class">title</xsl:attribute>
+        <a><xsl:attribute name="href">
+            <xsl:choose>
+                <xsl:when test="$IntranetBiblioDefaultView='normal'">
+                    /cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
+                </xsl:when>
+                <xsl:when test="$IntranetBiblioDefaultView='isbd'">
+                    /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
+                </xsl:when>
+                <xsl:when test="$IntranetBiblioDefaultView='labeled_marc'">
+                    /cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
+                </xsl:when>
+                <xsl:when test="$IntranetBiblioDefaultView='marc'">
+                    /cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    /cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:attribute><xsl:attribute name="class">title</xsl:attribute>
 
         <xsl:if test="marc:datafield[@tag=245]">
         <xsl:for-each select="marc:datafield[@tag=245]">