Bug 10465: remove useless reference to fields 780 and 785 in UNIMARC XSLT files
authorMathieu Saby <mathieu.saby@univ-rennes2.fr>
Sun, 8 Sep 2013 17:38:35 +0000 (19:38 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 23 Sep 2013 16:23:38 +0000 (16:23 +0000)
UNIMARCslim2OPACDetail.xsl and UNIMARCslim2intranetDetail.xsl contained
references to 780 and 785 fields, that exist in MARC21 but not in UNIMARC.

This patch remove the code related to 780 and 785 fields. No effect should
be visible.

To test : in a UNIMARC Koha
1. Be sure that OPACXSLTDetailsDisplay, OPACXSLTResultsDisplay,
   XSLTDetailsDisplay and XSLTResultsDisplay sysprefs are set to "default"
2. Apply the patch
3. Search some records in staff interface : the list view and the detail
   view must be exacty the same as before you apply the patch.
4. search some records in OPAC : the list view and the detail view must
   be exactly the same as before you apply the patch.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No diplay change, no koha-qa errors.
Removes what can't be displayed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked detail pages in OPAC and intranet still display correctly
and without errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl

index f2e3bcc..552385e 100644 (file)
       </xsl:for-each>
     </li>
   </xsl:if>
-
-        <!-- 780 -->
-        <xsl:if test="marc:datafield[@tag=780]">
-        <xsl:for-each select="marc:datafield[@tag=780]">
-        <li>
-        <xsl:choose>
-        <xsl:when test="@ind2=0">
-            <strong>Continues:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=1">
-            <strong>Continues in part:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=2">
-            <strong>Supersedes:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=3">
-            <strong>Supersedes in part:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=4">
-            <strong>Formed by the union: ... and: ...</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=5">
-            <strong>Absorbed:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=6">
-            <strong>Absorbed in part:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=7">
-            <strong>Separated from:</strong>
-        </xsl:when>
-        </xsl:choose>
-
-                <xsl:variable name="f780">
-                    <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">a_t</xsl:with-param>
-                    </xsl:call-template>
-                </xsl:variable>
-             <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
-                <xsl:value-of select="translate($f780, '()', '')"/>
-            </a>
-        </li>
-
-        <xsl:choose>
-        <xsl:when test="@ind1=0">
-            <li><xsl:value-of select="marc:subfield[@code='n']"/></li>
-        </xsl:when>
-        </xsl:choose>
-
-        </xsl:for-each>
-        </xsl:if>
-
-        <!-- 785 -->
-        <xsl:if test="marc:datafield[@tag=785]">
-        <xsl:for-each select="marc:datafield[@tag=785]">
-        <li>
-        <xsl:choose>
-        <xsl:when test="@ind2=0">
-            <strong>Continued by:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=1">
-            <strong>Continued in part by:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=2">
-            <strong>Superseded by:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=3">
-            <strong>Superseded in part by:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=4">
-            <strong>Absorbed by:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=5">
-            <strong>Absorbed in part by:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=6">
-            <strong>Split into .. and ...:</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=7">
-            <strong>Merged with ... to form ...</strong>
-        </xsl:when>
-        <xsl:when test="@ind2=8">
-            <strong>Changed back to:</strong>
-        </xsl:when>
-        </xsl:choose>
-                   <xsl:variable name="f785">
-                    <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">a_t</xsl:with-param>
-                    </xsl:call-template>
-                </xsl:variable>
-
-                <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
-                <xsl:value-of select="translate($f785, '()', '')"/>
-            </a>
-
-        </li>
-        </xsl:for-each>
-        </xsl:if>
-
-    </xsl:template>
+</xsl:template>
 
     <xsl:template name="nameABCDQ">
             <xsl:call-template name="chopPunctuation">
index 700b62f..f7d1984 100644 (file)
       </xsl:for-each>
     </span>
   </xsl:if>
-
-        <!-- 780 -->
-        <xsl:if test="marc:datafield[@tag=780]">
-        <xsl:for-each select="marc:datafield[@tag=780]">
-        <span class="results_summary">
-        <xsl:choose>
-        <xsl:when test="@ind2=0">
-            <span class="label">Continues:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=1">
-            <span class="label">Continues in part:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=2">
-            <span class="label">Supersedes:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=3">
-            <span class="label">Supersedes in part:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=4">
-            <span class="label">Formed by the union: ... and: ...</span>
-        </xsl:when>
-        <xsl:when test="@ind2=5">
-            <span class="label">Absorbed:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=6">
-            <span class="label">Absorbed in part:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=7">
-            <span class="label">Separated from:</span>
-        </xsl:when>
-        </xsl:choose>
-                <xsl:variable name="f780">
-                    <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">a_t</xsl:with-param>
-                    </xsl:call-template>
-                </xsl:variable>
-             <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
-                <xsl:value-of select="translate($f780, '()', '')"/>
-            </a>
-        </span>
-
-        <xsl:choose>
-        <xsl:when test="@ind1=0">
-            <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
-        </xsl:when>
-        </xsl:choose>
-
-        </xsl:for-each>
-        </xsl:if>
-
-        <!-- 785 -->
-        <xsl:if test="marc:datafield[@tag=785]">
-        <xsl:for-each select="marc:datafield[@tag=785]">
-        <span class="results_summary">
-        <xsl:choose>
-        <xsl:when test="@ind2=0">
-            <span class="label">Continued by:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=1">
-            <span class="label">Continued in part by:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=2">
-            <span class="label">Superseded by:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=3">
-            <span class="label">Superseded in part by:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=4">
-            <span class="label">Absorbed by:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=5">
-            <span class="label">Absorbed in part by:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=6">
-            <span class="label">Split into .. and ...:</span>
-        </xsl:when>
-        <xsl:when test="@ind2=7">
-            <span class="label">Merged with ... to form ...</span>
-        </xsl:when>
-        <xsl:when test="@ind2=8">
-            <span class="label">Changed back to:</span>
-        </xsl:when>
-
-        </xsl:choose>
-                   <xsl:variable name="f785">
-                    <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">a_t</xsl:with-param>
-                    </xsl:call-template>
-                </xsl:variable>
-
-                <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
-                <xsl:value-of select="translate($f785, '()', '')"/>
-            </a>
-
-        </span>
-        </xsl:for-each>
-        </xsl:if>
-
-    </xsl:template>
+</xsl:template>
 
     <xsl:template name="nameABCDQ">
             <xsl:call-template name="chopPunctuation">