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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-39 / +64 lines)
Lines 103-127 Link Here
103
        <xsl:if test="marc:datafield[@tag=245]">
103
        <xsl:if test="marc:datafield[@tag=245]">
104
        <h1>
104
        <h1>
105
            <xsl:for-each select="marc:datafield[@tag=245]">
105
            <xsl:for-each select="marc:datafield[@tag=245]">
106
                    <xsl:call-template name="subfieldSelect">
106
                <xsl:call-template name="subfieldSelect">
107
                        <xsl:with-param name="codes">a</xsl:with-param>
107
                    <xsl:with-param name="codes">a</xsl:with-param>
108
                    </xsl:call-template>
108
                </xsl:call-template>
109
                    <xsl:if test="marc:subfield[@code='h']">
109
                <xsl:text> </xsl:text>
110
                        <xsl:text> </xsl:text>
110
                <!--Bug 13381 add additional subfields-->
111
                        <xsl:call-template name="subfieldSelect">
111
                <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
112
                            <xsl:with-param name="codes">h</xsl:with-param>
112
                    <xsl:choose>
113
                        </xsl:call-template>
113
                        <xsl:when test="@code='h'">
114
                    </xsl:if>
114
                            <!-- Span class around subfield h so it can be suppressed via css -->
115
                    <xsl:if test="marc:subfield[@code='b']">
115
                            <span class="title_medium"><xsl:apply-templates/> </span>
116
                        <xsl:text> </xsl:text>
116
                        </xsl:when>
117
                        <xsl:call-template name="subfieldSelect">
117
                        <xsl:when test="@code='c'">
118
                            <xsl:with-param name="codes">b</xsl:with-param>
118
                            <!-- Span class around subfield c so it can be suppressed via css -->
119
                        </xsl:call-template>
119
                            <span class="title_resp_stmt"><xsl:apply-templates/> </span>
120
                    </xsl:if>
120
                        </xsl:when>
121
                    <xsl:text> </xsl:text>
121
                        <xsl:otherwise>
122
                    <xsl:call-template name="subfieldSelect">
122
                            <xsl:apply-templates/>
123
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
123
                            <xsl:text> </xsl:text>
124
                    </xsl:call-template>
124
                        </xsl:otherwise>
125
                    </xsl:choose>
126
                </xsl:for-each>
125
            </xsl:for-each>
127
            </xsl:for-each>
126
        </h1>
128
        </h1>
127
        </xsl:if>
129
        </xsl:if>
Lines 964-970 Link Here
964
        <xsl:for-each select="$authorfield">
966
        <xsl:for-each select="$authorfield">
965
        <xsl:choose>
967
        <xsl:choose>
966
          <xsl:when test="position()&gt;1"/>
968
          <xsl:when test="position()&gt;1"/>
967
          <xsl:when test="@tag&lt;700">Author(s): </xsl:when>
969
            <!-- #13383 -->
970
          <xsl:when test="@tag&lt;700">By: </xsl:when>
968
          <xsl:otherwise>Additional author(s): </xsl:otherwise>
971
          <xsl:otherwise>Additional author(s): </xsl:otherwise>
969
        </xsl:choose>
972
        </xsl:choose>
970
        <a>
973
        <a>
Lines 973-1000 Link Here
973
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
976
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
974
            </xsl:when>
977
            </xsl:when>
975
            <xsl:otherwise>
978
            <xsl:otherwise>
976
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
979
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
977
            </xsl:otherwise>
980
            </xsl:otherwise>
978
        </xsl:choose>
981
        </xsl:choose>
979
	<xsl:choose>
982
            <!-- #13383 -->
980
          <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
983
            <xsl:call-template name="chopPunctuation">
981
          <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
984
                <xsl:with-param name="chopString">
982
          <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
985
                    <xsl:call-template name="subfieldSelect">
983
	</xsl:choose>
986
                        <xsl:with-param name="codes">
984
	<!-- add relator code too between brackets-->
987
                            <xsl:choose>
985
	<xsl:if test="marc:subfield[@code='4' or @code='e']">
988
                                <!-- #13383 include subfield e for field 111  -->
986
      <span class="relatorcode">
989
                                <xsl:when test="@tag=111">abcdeqt</xsl:when>
987
      <xsl:text> [</xsl:text>
990
                                <xsl:otherwise>abcdqt</xsl:otherwise>
988
	  <xsl:choose>
991
                            </xsl:choose>
989
	    <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
992
                        </xsl:with-param>
990
	    <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
993
                    </xsl:call-template>
991
	  </xsl:choose>
994
                </xsl:with-param>
992
	  <xsl:text>]</xsl:text>
995
                <xsl:with-param name="punctuation">
993
      </span>
996
                    <xsl:text>:,;/ </xsl:text>
994
	</xsl:if>
997
                </xsl:with-param>
995
	</a>
998
            </xsl:call-template>
999
1000
            <!-- #13383 include relator code j for field 111 -->
1001
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1002
                <span class="relatorcode">
1003
                    <xsl:text> [</xsl:text>
1004
                    <xsl:choose>
1005
                        <xsl:when test="@tag=111">
1006
                            <xsl:choose>
1007
                                <!-- Prefer j over 4 -->
1008
                                <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when>
1009
                                <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
1010
                            </xsl:choose>
1011
                        </xsl:when>
1012
                        <!-- Prefer e over 4 -->
1013
                        <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when>
1014
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
1015
                    </xsl:choose>
1016
                    <xsl:text>]</xsl:text>
1017
                </span>
1018
            </xsl:if>
1019
	       </a>
996
        <xsl:choose>
1020
        <xsl:choose>
997
          <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1021
            <!-- #13383 added separator with span -->
1022
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
998
        </xsl:choose>
1023
        </xsl:choose>
999
        </xsl:for-each>
1024
        </xsl:for-each>
1000
        </h5>
1025
        </h5>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-39 / +100 lines)
Lines 302-338 Link Here
302
        <xsl:attribute name="class">title</xsl:attribute>
302
        <xsl:attribute name="class">title</xsl:attribute>
303
303
304
        <xsl:if test="marc:datafield[@tag=245]">
304
        <xsl:if test="marc:datafield[@tag=245]">
305
        <xsl:for-each select="marc:datafield[@tag=245]">
305
            <xsl:for-each select="marc:datafield[@tag=245]">
306
            <xsl:variable name="title">
306
                <xsl:call-template name="subfieldSelect">
307
                     <xsl:call-template name="subfieldSelect">
307
                    <xsl:with-param name="codes">a</xsl:with-param>
308
                        <xsl:with-param name="codes">a</xsl:with-param>
309
                    </xsl:call-template>
310
                    <xsl:if test="marc:subfield[@code='h']">
311
                        <xsl:text> </xsl:text>
312
                        <xsl:call-template name="subfieldSelect">
313
                            <xsl:with-param name="codes">h</xsl:with-param>
314
                        </xsl:call-template>
315
                    </xsl:if>
316
                    <xsl:if test="marc:subfield[@code='b']">
317
                        <xsl:text> </xsl:text>
318
                        <xsl:call-template name="subfieldSelect">
319
                            <xsl:with-param name="codes">b</xsl:with-param>
320
                        </xsl:call-template>
321
                    </xsl:if>
322
                <xsl:text> </xsl:text>
323
                    <xsl:call-template name="subfieldSelect">
324
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
325
                     </xsl:call-template>
326
            </xsl:variable>
327
            <xsl:variable name="titleChop">
328
                <xsl:call-template name="chopPunctuation">
329
                    <xsl:with-param name="chopString">
330
                        <xsl:value-of select="$title"/>
331
                    </xsl:with-param>
332
                </xsl:call-template>
308
                </xsl:call-template>
333
            </xsl:variable>
309
                <xsl:text> </xsl:text>
334
            <xsl:value-of select="$titleChop"/>
310
                <!--Bug 13381 add additional subfields-->
335
        </xsl:for-each>
311
                <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
312
                    <xsl:choose>
313
                        <xsl:when test="@code='h'">
314
                            <!-- Span class around subfield h so it can be suppressed via css -->
315
                            <span class="title_medium"><xsl:apply-templates/> </span>
316
                        </xsl:when>
317
                        <xsl:when test="@code='c'">
318
                            <!-- Span class around subfield c so it can be suppressed via css -->
319
                            <span class="title_resp_stmt"><xsl:apply-templates/> </span>
320
                        </xsl:when>
321
                        <xsl:otherwise>
322
                            <xsl:apply-templates/>
323
                            <xsl:text> </xsl:text>
324
                        </xsl:otherwise>
325
                    </xsl:choose>
326
                </xsl:for-each>
327
            </xsl:for-each>
336
        </xsl:if>
328
        </xsl:if>
337
    </a>
329
    </a>
338
330
Lines 357-365 Link Here
357
        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
349
        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
358
        </xsl:otherwise>
350
        </xsl:otherwise>
359
    </xsl:choose>
351
    </xsl:choose>
360
    <xsl:call-template name="nameABCQ"/></a>
352
        <xsl:call-template name="chopPunctuation">
361
    <xsl:choose>
353
            <xsl:with-param name="chopString">
362
    <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
354
                <xsl:call-template name="subfieldSelect">
355
                    <xsl:with-param name="codes">abcdqt</xsl:with-param>
356
                </xsl:call-template>
357
            </xsl:with-param>
358
            <xsl:with-param name="punctuation">
359
                <xsl:text>:,;/ </xsl:text>
360
            </xsl:with-param>
361
        </xsl:call-template>
362
    </a>
363
        <xsl:if test="marc:subfield[@code='4' or @code='e']">
364
            <span class="relatorcode">
365
                <xsl:text> [</xsl:text>
366
                <xsl:choose>
367
                    <!-- Prefer e over 4 -->
368
                    <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when>
369
                    <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
370
                </xsl:choose>
371
                <xsl:text>]</xsl:text>
372
            </span>
373
        </xsl:if>
374
        <xsl:choose>
375
            <!-- #13383 added separator with span -->
376
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
377
        </xsl:choose>
363
    </xsl:for-each>
378
    </xsl:for-each>
364
379
365
    <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
380
    <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
Lines 372-379 Link Here
372
        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
387
        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
373
        </xsl:otherwise>
388
        </xsl:otherwise>
374
    </xsl:choose>
389
    </xsl:choose>
375
    <xsl:call-template name="nameABCDN"/></a>
390
        <xsl:call-template name="chopPunctuation">
376
    <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
391
            <xsl:with-param name="chopString">
392
                <xsl:call-template name="subfieldSelect">
393
                    <xsl:with-param name="codes">abcdqt</xsl:with-param>
394
                </xsl:call-template>
395
            </xsl:with-param>
396
            <xsl:with-param name="punctuation">
397
                <xsl:text>:,;/ </xsl:text>
398
            </xsl:with-param>
399
        </xsl:call-template></a>
400
        <xsl:if test="marc:subfield[@code='4' or @code='e']">
401
            <span class="relatorcode">
402
                <xsl:text> [</xsl:text>
403
                <xsl:choose>
404
                    <!-- Prefer e over 4 -->
405
                    <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when>
406
                    <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
407
                </xsl:choose>
408
                <xsl:text>]</xsl:text>
409
            </span>
410
        </xsl:if>
411
        <xsl:choose>
412
            <!-- #13383 added separator with span -->
413
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
414
        </xsl:choose>
377
    </xsl:for-each>
415
    </xsl:for-each>
378
416
379
    <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
417
    <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
Lines 381-387 Link Here
381
        <xsl:when test="marc:subfield[@code='n']">
419
        <xsl:when test="marc:subfield[@code='n']">
382
           <xsl:text> </xsl:text>
420
           <xsl:text> </xsl:text>
383
           <xsl:call-template name="subfieldSelect">
421
           <xsl:call-template name="subfieldSelect">
384
              <xsl:with-param name="codes">n</xsl:with-param>                              </xsl:call-template>
422
              <xsl:with-param name="codes">n</xsl:with-param>
423
           </xsl:call-template>
385
           <xsl:text> </xsl:text>
424
           <xsl:text> </xsl:text>
386
        </xsl:when>
425
        </xsl:when>
387
        </xsl:choose>
426
        </xsl:choose>
Lines 394-402 Link Here
394
        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
433
        <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
395
        </xsl:otherwise>
434
        </xsl:otherwise>
396
    </xsl:choose>
435
    </xsl:choose>
397
    <xsl:call-template name="nameACDEQ"/></a>
436
        <xsl:call-template name="chopPunctuation">
398
    <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
437
            <xsl:with-param name="chopString">
399
438
                <xsl:call-template name="subfieldSelect">
439
                    <xsl:with-param name="codes">abcdeqt</xsl:with-param>
440
                </xsl:call-template>
441
            </xsl:with-param>
442
            <xsl:with-param name="punctuation">
443
                <xsl:text>:,;/ </xsl:text>
444
            </xsl:with-param>
445
        </xsl:call-template></a>
446
        <xsl:if test="marc:subfield[@code='4' or @code='j'][. != '']">
447
            <span class="relatorcode">
448
                <xsl:text> [</xsl:text>
449
                <xsl:choose>
450
                    <!-- Prefer j over 4 -->
451
                    <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when>
452
                    <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
453
                </xsl:choose>
454
                <xsl:text>]</xsl:text>
455
            </span>
456
        </xsl:if>
457
        <xsl:choose>
458
            <!-- #13383 added separator with span -->
459
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
460
        </xsl:choose>
400
    </xsl:for-each>
461
    </xsl:for-each>
401
    </p>
462
    </p>
402
    </xsl:when>
463
    </xsl:when>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-33 / +56 lines)
Lines 120-148 Link Here
120
                </xsl:call-template>
120
                </xsl:call-template>
121
            </h1>
121
            </h1>
122
        </xsl:if>
122
        </xsl:if>
123
123
        <!--Bug 13381 -->
124
        <xsl:if test="marc:datafield[@tag=245]">
124
        <xsl:if test="marc:datafield[@tag=245]">
125
        <h1 class="title" property="name">
125
        <h1 class="title" property="name">
126
            <xsl:for-each select="marc:datafield[@tag=245]">
126
            <xsl:for-each select="marc:datafield[@tag=245]">
127
                    <xsl:call-template name="subfieldSelect">
127
                <xsl:call-template name="subfieldSelect">
128
                        <xsl:with-param name="codes">a</xsl:with-param>
128
                    <xsl:with-param name="codes">a</xsl:with-param>
129
                    </xsl:call-template>
129
                </xsl:call-template>
130
                    <xsl:if test="marc:subfield[@code='h']">
131
                        <xsl:text> </xsl:text>
132
                        <xsl:call-template name="subfieldSelect">
133
                            <xsl:with-param name="codes">h</xsl:with-param>
134
                        </xsl:call-template>
135
                    </xsl:if>
136
                    <xsl:if test="marc:subfield[@code='b']">
137
                        <xsl:text> </xsl:text>
138
                        <xsl:call-template name="subfieldSelect">
139
                            <xsl:with-param name="codes">b</xsl:with-param>
140
                        </xsl:call-template>
141
                    </xsl:if>
142
                <xsl:text> </xsl:text>
130
                <xsl:text> </xsl:text>
143
                    <xsl:call-template name="subfieldSelect">
131
                <!--Bug 13381 add additional subfields-->
144
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
132
                <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
145
                    </xsl:call-template>
133
                    <xsl:choose>
134
                        <xsl:when test="@code='h'">
135
                            <!-- Span class around subfield h so it can be suppressed via css -->
136
                            <span class="title_medium"><xsl:apply-templates/> </span>
137
                        </xsl:when>
138
                        <xsl:when test="@code='c'">
139
                            <!-- Span class around subfield c so it can be suppressed via css -->
140
                            <span class="title_resp_stmt"><xsl:apply-templates/> </span>
141
                        </xsl:when>
142
                        <xsl:otherwise>
143
                            <xsl:apply-templates/>
144
                            <xsl:text> </xsl:text>
145
                        </xsl:otherwise>
146
                    </xsl:choose>
147
                </xsl:for-each>
146
            </xsl:for-each>
148
            </xsl:for-each>
147
        </h1>
149
        </h1>
148
        </xsl:if>
150
        </xsl:if>
Lines 1043-1049 Link Here
1043
        <xsl:param name="materialTypeLabel" />
1045
        <xsl:param name="materialTypeLabel" />
1044
        <xsl:param name="theme" />
1046
        <xsl:param name="theme" />
1045
        <xsl:for-each select="$authorfield">
1047
        <xsl:for-each select="$authorfield">
1046
            <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
1048
            <!-- #13383 added separator with span -->
1049
            <xsl:choose><xsl:when test="position()!=1"><span class="separator"><xsl:text> | </xsl:text></span></xsl:when></xsl:choose>
1047
            <xsl:choose>
1050
            <xsl:choose>
1048
                <xsl:when test="not(@tag=111 or @tag=711)" />
1051
                <xsl:when test="not(@tag=111 or @tag=711)" />
1049
                <xsl:when test="marc:subfield[@code='n']">
1052
                <xsl:when test="marc:subfield[@code='n']">
Lines 1083-1103 Link Here
1083
                        <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1086
                        <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1084
                    </xsl:choose>
1087
                    </xsl:choose>
1085
                <span property="name">
1088
                <span property="name">
1086
                <xsl:choose>
1089
                    <!-- #13383 -->
1087
                    <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
1090
                    <xsl:call-template name="chopPunctuation">
1088
                    <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
1091
                        <xsl:with-param name="chopString">
1089
                    <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
1092
                            <xsl:call-template name="subfieldSelect">
1090
                </xsl:choose>
1093
                                <xsl:with-param name="codes">
1094
                                    <xsl:choose>
1095
                                        <!-- #13383 include subfield e for field 111  -->
1096
                                        <xsl:when test="@tag=111">abcdeqt</xsl:when>
1097
                                        <xsl:otherwise>abcdqt</xsl:otherwise>
1098
                                    </xsl:choose>
1099
                                </xsl:with-param>
1100
                            </xsl:call-template>
1101
                        </xsl:with-param>
1102
                        <xsl:with-param name="punctuation">
1103
                            <xsl:text>:,;/ </xsl:text>
1104
                        </xsl:with-param>
1105
                    </xsl:call-template>
1091
                </span></span></span>
1106
                </span></span></span>
1092
                <!-- add relator code too between brackets-->
1107
                <!-- #13383 include relator code j for field 111 -->
1093
                <xsl:if test="marc:subfield[@code='4' or @code='e']">
1108
                <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1094
                    <span class="relatorcode">
1109
                    <span class="relatorcode">
1095
                    <xsl:text> [</xsl:text>
1110
                        <xsl:text> [</xsl:text>
1096
                    <xsl:choose>
1111
                        <xsl:choose>
1097
                        <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
1112
                            <xsl:when test="@tag=111">
1098
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
1113
                                <xsl:choose>
1099
                    </xsl:choose>
1114
                                    <!-- Prefer j over 4 -->
1100
                    <xsl:text>]</xsl:text>
1115
                                    <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when>
1116
                                    <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
1117
                                </xsl:choose>
1118
                            </xsl:when>
1119
                            <!-- Prefer e over 4 -->
1120
                            <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when>
1121
                            <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
1122
                        </xsl:choose>
1123
                        <xsl:text>]</xsl:text>
1101
                    </span>
1124
                    </span>
1102
                </xsl:if>
1125
                </xsl:if>
1103
            </a>
1126
            </a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-64 / +95 lines)
Lines 415-451 Link Here
415
        <xsl:attribute name="class">title</xsl:attribute>
415
        <xsl:attribute name="class">title</xsl:attribute>
416
416
417
        <xsl:if test="marc:datafield[@tag=245]">
417
        <xsl:if test="marc:datafield[@tag=245]">
418
        <xsl:for-each select="marc:datafield[@tag=245]">
418
            <xsl:for-each select="marc:datafield[@tag=245]">
419
            <xsl:variable name="title">
419
                <xsl:call-template name="subfieldSelect">
420
                     <xsl:call-template name="subfieldSelect">
420
                    <xsl:with-param name="codes">a</xsl:with-param>
421
                        <xsl:with-param name="codes">a</xsl:with-param>
422
                    </xsl:call-template>
423
                    <xsl:if test="marc:subfield[@code='h']">
424
                        <xsl:text> </xsl:text>
425
                        <xsl:call-template name="subfieldSelect">
426
                            <xsl:with-param name="codes">h</xsl:with-param>
427
                        </xsl:call-template>
428
                    </xsl:if>
429
                    <xsl:if test="marc:subfield[@code='b']">
430
                        <xsl:text> </xsl:text>
431
                        <xsl:call-template name="subfieldSelect">
432
                            <xsl:with-param name="codes">b</xsl:with-param>
433
                        </xsl:call-template>
434
                    </xsl:if>
435
                <xsl:text> </xsl:text>
436
                    <xsl:call-template name="subfieldSelect">
437
                        <xsl:with-param name="codes">fgknps</xsl:with-param>
438
                     </xsl:call-template>
439
            </xsl:variable>
440
            <xsl:variable name="titleChop">
441
                <xsl:call-template name="chopPunctuation">
442
                    <xsl:with-param name="chopString">
443
                        <xsl:value-of select="$title"/>
444
                    </xsl:with-param>
445
                </xsl:call-template>
421
                </xsl:call-template>
446
            </xsl:variable>
422
                <xsl:text> </xsl:text>
447
            <xsl:value-of select="$titleChop"/>
423
                <!--Bug 13381 add additional subfields-->
448
        </xsl:for-each>
424
                <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
425
                    <xsl:choose>
426
                        <xsl:when test="@code='h'">
427
                            <!-- Span class around subfield h so it can be suppressed via css -->
428
                            <span class="title_medium"><xsl:apply-templates/> </span>
429
                        </xsl:when>
430
                        <xsl:when test="@code='c'">
431
                            <!-- Span class around subfield c so it can be suppressed via css -->
432
                            <span class="title_resp_stmt"><xsl:apply-templates/> </span>
433
                        </xsl:when>
434
                        <xsl:otherwise>
435
                            <xsl:apply-templates/>
436
                            <xsl:text> </xsl:text>
437
                        </xsl:otherwise>
438
                    </xsl:choose>
439
                </xsl:for-each>
440
            </xsl:for-each>
449
        </xsl:if>
441
        </xsl:if>
450
    </a>
442
    </a>
451
    <p>
443
    <p>
Lines 463-516 Link Here
463
455
464
    by <span class="author">
456
    by <span class="author">
465
        <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']">
457
        <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']">
458
            <xsl:call-template name="chopPunctuation">
459
                <xsl:with-param name="chopString">
460
                    <xsl:call-template name="subfieldSelect">
461
                        <xsl:with-param name="codes">abcdqt</xsl:with-param>
462
                    </xsl:call-template>
463
                </xsl:with-param>
464
                <xsl:with-param name="punctuation">
465
                    <xsl:text>:,;/ </xsl:text>
466
                </xsl:with-param>
467
            </xsl:call-template>
468
            <xsl:if test="marc:subfield[@code='4' or @code='e']">
469
                <span class="relatorcode">
470
                    <xsl:text> [</xsl:text>
471
                    <xsl:choose>
472
                        <!-- Prefer e over 4 -->
473
                        <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when>
474
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
475
                    </xsl:choose>
476
                    <xsl:text>]</xsl:text>
477
                </span>
478
            </xsl:if>
466
            <xsl:choose>
479
            <xsl:choose>
467
            <xsl:when test="position()=last()">
480
                <!-- #13383 added separator with span -->
468
                <xsl:call-template name="nameABCQ"/>.
481
                <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
469
            </xsl:when>
470
            <xsl:otherwise>
471
                <xsl:call-template name="nameABCQ"/>;
472
            </xsl:otherwise>
473
            </xsl:choose>
482
            </xsl:choose>
474
        </xsl:for-each>
483
        </xsl:for-each>
475
484
476
        <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
485
        <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
477
            <xsl:choose>
486
            <xsl:choose>
478
            <xsl:when test="position()=1">
487
            <xsl:when test="position()=1">
479
		<xsl:text> -- </xsl:text>
488
		      <xsl:text> -- </xsl:text>
480
            </xsl:when>
489
            </xsl:when>
481
            </xsl:choose>
490
            </xsl:choose>
491
            <xsl:call-template name="chopPunctuation">
492
                <xsl:with-param name="chopString">
493
                    <xsl:call-template name="subfieldSelect">
494
                        <xsl:with-param name="codes">abcdqt</xsl:with-param>
495
                    </xsl:call-template>
496
                </xsl:with-param>
497
                <xsl:with-param name="punctuation">
498
                    <xsl:text>:,;/ </xsl:text>
499
                </xsl:with-param>
500
            </xsl:call-template>
501
            <xsl:if test="marc:subfield[@code='4' or @code='e']">
502
                <span class="relatorcode">
503
                    <xsl:text> [</xsl:text>
504
                    <xsl:choose>
505
                        <!-- Prefer e over 4 -->
506
                        <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when>
507
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
508
                    </xsl:choose>
509
                    <xsl:text>]</xsl:text>
510
                </span>
511
            </xsl:if>
482
            <xsl:choose>
512
            <xsl:choose>
483
            <xsl:when test="position()=last()">
513
                <!-- #13383 added separator with span -->
484
                <xsl:call-template name="nameABCDN"/>
514
                <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
485
            </xsl:when>
486
            <xsl:otherwise>
487
                <xsl:call-template name="nameABCDN"/>;
488
            </xsl:otherwise>
489
            </xsl:choose>
515
            </xsl:choose>
490
        </xsl:for-each>
516
        </xsl:for-each>
491
517
492
        <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
518
        <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
519
            <xsl:if test="position()=1">
520
		      <xsl:text> -- </xsl:text>
521
            </xsl:if>
522
            <xsl:call-template name="chopPunctuation">
523
                <xsl:with-param name="chopString">
524
                    <xsl:call-template name="subfieldSelect">
525
                        <xsl:with-param name="codes">abcdeqt</xsl:with-param>
526
                    </xsl:call-template>
527
                </xsl:with-param>
528
                <xsl:with-param name="punctuation">
529
                    <xsl:text>:,;/ </xsl:text>
530
                </xsl:with-param>
531
            </xsl:call-template>
532
            <xsl:if test="marc:subfield[@code='4' or @code='j'][. != '']">
533
                <span class="relatorcode">
534
                    <xsl:text> [</xsl:text>
535
                    <xsl:choose>
536
                        <!-- Prefer j over 4 -->
537
                        <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when>
538
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise>
539
                    </xsl:choose>
540
                    <xsl:text>]</xsl:text>
541
                </span>
542
            </xsl:if>
493
            <xsl:choose>
543
            <xsl:choose>
494
            <xsl:when test="position()=1">
544
                <!-- #13383 added separator with span -->
495
		<xsl:text> -- </xsl:text>
545
                <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
496
            </xsl:when>
497
            </xsl:choose>
498
            <xsl:choose>
499
            <xsl:when test="marc:subfield[@code='n']">
500
               <xsl:text> </xsl:text>
501
               <xsl:call-template name="subfieldSelect">
502
                  <xsl:with-param name="codes">n</xsl:with-param>
503
               </xsl:call-template>
504
               <xsl:text> </xsl:text>
505
            </xsl:when>
506
            </xsl:choose>
507
            <xsl:choose>
508
            <xsl:when test="position()=last()">
509
                <xsl:call-template name="nameACDEQ"/>.
510
            </xsl:when>
511
            <xsl:otherwise>
512
                <xsl:call-template name="nameACDEQ"/>;
513
            </xsl:otherwise>
514
            </xsl:choose>
546
            </xsl:choose>
515
        </xsl:for-each>
547
        </xsl:for-each>
516
    </span>
548
    </span>
517
- 

Return to bug 13383