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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl (-4 / +18 lines)
Lines 15-20 Link Here
15
15
16
        <!-- Sysprefs -->
16
        <!-- Sysprefs -->
17
        <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
17
        <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
18
        <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
19
        <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
18
20
19
        <xsl:variable name="leader" select="marc:leader"/>
21
        <xsl:variable name="leader" select="marc:leader"/>
20
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
22
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
Lines 293-308 Link Here
293
        </span>
295
        </span>
294
        </xsl:if>
296
        </xsl:if>
295
297
298
        <!-- Subjects -->
299
296
        <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
300
        <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
297
            <span class="results_summary"><span class="label">Emner: </span>
301
            <span class="results_summary subjects"><span class="label">Emne(r): </span>
298
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
302
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
299
            <a>
303
            <a>
300
            <xsl:choose>
304
            <xsl:choose>
301
            <xsl:when test="marc:subfield[@code=9]">
305
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
302
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
306
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
303
            </xsl:when>
307
            </xsl:when>
308
            <xsl:when test="$TraceSubjectSubdivisions='1'">
309
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
310
                        <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
311
                        <xsl:with-param name="delimeter"> and </xsl:with-param>
312
                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:{</xsl:with-param>
313
                        <xsl:with-param name="suffix">})</xsl:with-param>
314
                    </xsl:call-template>
315
                </xsl:attribute>
316
            </xsl:when>
304
            <xsl:otherwise>
317
            <xsl:otherwise>
305
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
318
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:{<xsl:value-of select="marc:subfield[@code='a']"/>}</xsl:attribute>
306
            </xsl:otherwise>
319
            </xsl:otherwise>
307
            </xsl:choose>
320
            </xsl:choose>
308
            <xsl:call-template name="chopPunctuation">
321
            <xsl:call-template name="chopPunctuation">
Lines 313-319 Link Here
313
                        <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
326
                        <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
314
                    </xsl:call-template>
327
                    </xsl:call-template>
315
                </xsl:with-param>
328
                </xsl:with-param>
316
            </xsl:call-template></a>
329
            </xsl:call-template>
330
            </a>
317
            <xsl:choose>
331
            <xsl:choose>
318
            <xsl:when test="position()=last()"></xsl:when>
332
            <xsl:when test="position()=last()"></xsl:when>
319
            <xsl:otherwise> | </xsl:otherwise>
333
            <xsl:otherwise> | </xsl:otherwise>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl (-1 / +3 lines)
Lines 24-36 Link Here
24
		<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
24
		<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
25
		<xsl:param name="subdivCodes"/>
25
		<xsl:param name="subdivCodes"/>
26
		<xsl:param name="subdivDelimiter"/>
26
		<xsl:param name="subdivDelimiter"/>
27
        <xsl:param name="prefix"/>
28
        <xsl:param name="suffix"/>
27
		<xsl:variable name="str">
29
		<xsl:variable name="str">
28
			<xsl:for-each select="marc:subfield">
30
			<xsl:for-each select="marc:subfield">
29
				<xsl:if test="contains($codes, @code)">
31
				<xsl:if test="contains($codes, @code)">
30
                    <xsl:if test="contains($subdivCodes, @code)">
32
                    <xsl:if test="contains($subdivCodes, @code)">
31
                        <xsl:value-of select="$subdivDelimiter"/>
33
                        <xsl:value-of select="$subdivDelimiter"/>
32
                    </xsl:if>
34
                    </xsl:if>
33
					<xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
35
					<xsl:value-of select="$prefix"/><xsl:value-of select="text()"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
34
				</xsl:if>
36
				</xsl:if>
35
			</xsl:for-each>
37
			</xsl:for-each>
36
		</xsl:variable>
38
		</xsl:variable>
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl (-4 / +20 lines)
Lines 15-20 Link Here
15
    </xsl:template>
15
    </xsl:template>
16
16
17
    <xsl:template match="marc:record">
17
    <xsl:template match="marc:record">
18
    
19
        <!-- Sysprefs -->
20
        <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
21
        <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
18
22
19
        <xsl:variable name="leader" select="marc:leader"/>
23
        <xsl:variable name="leader" select="marc:leader"/>
20
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
24
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
Lines 298-313 Link Here
298
        </span>
302
        </span>
299
        </xsl:if>
303
        </xsl:if>
300
304
305
        <!-- Subjects -->
306
        
301
        <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
307
        <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
302
            <span class="results_summary"><span class="label">Emner: </span>
308
            <span class="results_summary subjects"><span class="label">Emne(r): </span>
303
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
309
            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
304
            <a>
310
            <a>
305
            <xsl:choose>
311
            <xsl:choose>
306
            <xsl:when test="marc:subfield[@code=9]">
312
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
307
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
313
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
308
            </xsl:when>
314
            </xsl:when>
315
            <xsl:when test="$TraceSubjectSubdivisions='1'">
316
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
317
                        <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
318
                        <xsl:with-param name="delimeter"> and </xsl:with-param>
319
                        <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:{</xsl:with-param>
320
                        <xsl:with-param name="suffix">})</xsl:with-param>
321
                    </xsl:call-template>
322
                </xsl:attribute>
323
            </xsl:when>
309
            <xsl:otherwise>
324
            <xsl:otherwise>
310
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
325
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:{<xsl:value-of select="marc:subfield[@code='a']"/>}</xsl:attribute>
311
            </xsl:otherwise>
326
            </xsl:otherwise>
312
            </xsl:choose>
327
            </xsl:choose>
313
            <xsl:call-template name="chopPunctuation">
328
            <xsl:call-template name="chopPunctuation">
Lines 318-324 Link Here
318
                        <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
333
                        <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
319
                    </xsl:call-template>
334
                    </xsl:call-template>
320
                </xsl:with-param>
335
                </xsl:with-param>
321
            </xsl:call-template></a>
336
            </xsl:call-template>
337
            </a>
322
            <xsl:choose>
338
            <xsl:choose>
323
            <xsl:when test="position()=last()"></xsl:when>
339
            <xsl:when test="position()=last()"></xsl:when>
324
            <xsl:otherwise> | </xsl:otherwise>
340
            <xsl:otherwise> | </xsl:otherwise>
(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl (-2 / +3 lines)
Lines 25-37 Link Here
25
		<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
25
		<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
26
		<xsl:param name="subdivCodes"/>
26
		<xsl:param name="subdivCodes"/>
27
		<xsl:param name="subdivDelimiter"/>
27
		<xsl:param name="subdivDelimiter"/>
28
        <xsl:param name="prefix"/>
29
        <xsl:param name="suffix"/>
28
		<xsl:variable name="str">
30
		<xsl:variable name="str">
29
			<xsl:for-each select="marc:subfield">
31
			<xsl:for-each select="marc:subfield">
30
				<xsl:if test="contains($codes, @code)">
32
				<xsl:if test="contains($codes, @code)">
31
                    <xsl:if test="contains($subdivCodes, @code)">
33
                    <xsl:if test="contains($subdivCodes, @code)">
32
                        <xsl:value-of select="$subdivDelimiter"/>
34
                        <xsl:value-of select="$subdivDelimiter"/>
33
                    </xsl:if>
35
                    </xsl:if>
34
					<xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
36
					<xsl:value-of select="$prefix"/><xsl:value-of select="text()"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
35
				</xsl:if>
37
				</xsl:if>
36
			</xsl:for-each>
38
			</xsl:for-each>
37
		</xsl:variable>
39
		</xsl:variable>
38
- 

Return to bug 7537