View | Details | Raw Unified | Return to bug 5622
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-6 / +6 lines)
Lines 275-294 Link Here
275
        </span>
275
        </span>
276
        </xsl:if>
276
        </xsl:if>
277
277
278
        <!-- Set -->
278
        <!-- Host item entry -->
279
        <xsl:if test="$leader19='c'">
279
        <xsl:if test="marc:datafield[@tag=773]">
280
        <span class="results_summary"><span class="label">Set: </span>
280
        <span class="results_summary"><span class="label">In: </span>
281
        <xsl:for-each select="marc:datafield[@tag=773]">
281
        <xsl:for-each select="marc:datafield[@tag=773]">
282
            <a>
282
            <a>
283
            <xsl:choose>
283
            <xsl:choose>
284
            <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
284
            <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
285
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
285
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
286
            </xsl:when>
286
            </xsl:when>
287
            <xsl:otherwise>
287
            <xsl:otherwise>
288
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Title:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
288
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Title:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
289
            </xsl:otherwise>
289
            </xsl:otherwise>
290
            </xsl:choose>
290
            </xsl:choose>
291
            <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
291
            <xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')" />
292
            </a>
292
            </a>
293
            <xsl:choose>
293
            <xsl:choose>
294
                <xsl:when test="position()=last()"></xsl:when>
294
                <xsl:when test="position()=last()"></xsl:when>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (+18 lines)
Lines 65-70 Link Here
65
<xsl:text> </xsl:text>
65
<xsl:text> </xsl:text>
66
	</xsl:template>
66
	</xsl:template>
67
67
68
	<!-- Function extractControlNumber is used to extract the control number (record number) from MARC tags 773/80/85 [etc.] subfield $w.
69
	     Parameter: control number string.
70
	     Assumes LOC convention: (OrgCode)recordNumber.
71
	     If OrgCode is not present, return full string.
72
	     Additionally, handle various brackets/parentheses. Chop leading and trailing spaces.
73
	-->
74
	<xsl:template name="extractControlNumber">
75
	    <xsl:param name="subfieldW"/>
76
	    <xsl:variable name="tranW" select="translate($subfieldW,']})&gt;','))))')"/>
77
	    <xsl:choose>
78
	      <xsl:when test="contains($tranW,')')">
79
	        <xsl:value-of select="normalize-space(translate(substring-after($tranW,')'),'[]{}()&lt;&gt;',''))"/>
80
	      </xsl:when>
81
	      <xsl:otherwise>
82
	        <xsl:value-of select="normalize-space($subfieldW)"/>
83
	      </xsl:otherwise>
84
	    </xsl:choose>
85
	</xsl:template>
68
86
69
    <!-- Function m880Select:  Display Alternate Graphic Representation (MARC 880) for selected latin "base"tags
87
    <!-- Function m880Select:  Display Alternate Graphic Representation (MARC 880) for selected latin "base"tags
70
        - should be called immediately before the corresonding latin tags are processed 
88
        - should be called immediately before the corresonding latin tags are processed 
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-1 / +18 lines)
Lines 65-70 Link Here
65
<xsl:text> </xsl:text>
65
<xsl:text> </xsl:text>
66
	</xsl:template>
66
	</xsl:template>
67
67
68
	<!-- Function extractControlNumber is used to extract the control number (record number) from MARC tags 773/80/85 [etc.] subfield $w.
69
	     Parameter: control number string.
70
	     Assumes LOC convention: (OrgCode)recordNumber.
71
	     If OrgCode is not present, return full string.
72
	     Additionally, handle various brackets/parentheses. Chop leading and trailing spaces.
73
	-->
74
	<xsl:template name="extractControlNumber">
75
	    <xsl:param name="subfieldW"/>
76
	    <xsl:variable name="tranW" select="translate($subfieldW,']})&gt;','))))')"/>
77
	    <xsl:choose>
78
	      <xsl:when test="contains($tranW,')')">
79
	        <xsl:value-of select="normalize-space(translate(substring-after($tranW,')'),'[]{}()&lt;&gt;',''))"/>
80
	      </xsl:when>
81
	      <xsl:otherwise>
82
	        <xsl:value-of select="normalize-space($subfieldW)"/>
83
	      </xsl:otherwise>
84
	    </xsl:choose>
85
	</xsl:template>
68
86
69
    <!-- Function m880Select:  Display Alternate Graphic Representation (MARC 880) for selected latin "base"tags
87
    <!-- Function m880Select:  Display Alternate Graphic Representation (MARC 880) for selected latin "base"tags
70
        - should be called immediately before the corresonding latin tags are processed 
88
        - should be called immediately before the corresonding latin tags are processed 
71
- 

Return to bug 5622