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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-14 / +52 lines)
Lines 46-51 Link Here
46
        <xsl:variable name="leader" select="marc:leader"/>
46
        <xsl:variable name="leader" select="marc:leader"/>
47
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
47
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
48
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
48
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
49
        <xsl:variable name="leader18" select="substring($leader,19,1)"/>
49
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
50
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
50
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
51
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
51
        <xsl:variable name="materialTypeCode">
52
        <xsl:variable name="materialTypeCode">
Lines 300-321 Link Here
300
                    <xsl:for-each select="marc:datafield[@tag=260]">
301
                    <xsl:for-each select="marc:datafield[@tag=260]">
301
                        <xsl:for-each select="marc:subfield">
302
                        <xsl:for-each select="marc:subfield">
302
                            <xsl:if test="@code='a'">
303
                            <xsl:if test="@code='a'">
303
                                <a>
304
                                <span class="publisher_place" property="location">
304
                                    <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
305
                                    <a>
305
                                    <xsl:value-of select="current()"/>
306
                                        <!-- do not trim `.` as it is used in abbreviations -->
306
                                </a>
307
                                       <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
308
                                       <xsl:value-of select="current()"/>
309
                                    </a>
310
                                </span>
307
                            </xsl:if>
311
                            </xsl:if>
308
                            <xsl:if test="@code='b'">
312
                            <xsl:if test="@code='b'">
309
                                <a>
313
                                <span property="publisher" typeof="Organization">
310
                                    <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
314
                                    <span property="name" class="publisher_name">
311
                                    <xsl:value-of select="current()"/>
315
                                        <a>
312
                                </a>
316
                                           <!-- do not trim `.` as it is used in abbreviations -->
317
                                           <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
318
                                           <xsl:value-of select="current()"/>
319
                                       </a>
320
                                    </span>
321
                                </span>
313
                            </xsl:if>
322
                            </xsl:if>
314
                            <xsl:if test="@code='c'">
323
                            <xsl:if test="@code='c'">
315
                                <a>
324
                                <span property="datePublished" class="publisher_date">
316
                                    <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
325
                                    <a>
317
                                    <xsl:value-of select="current()"/>
326
                                       <!-- do not trim `.` as it is used in abbreviations -->
318
                                </a>
327
                                       <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
328
                                       <xsl:value-of select="current()"/>
329
                                    </a>
330
                                </span>
331
                            </xsl:if>
332
                            <xsl:if test="@code='e'">
333
                               <span property="location" class="manufacturer_place">
334
                                        <xsl:value-of select="current()"/>
335
                               </span>
336
                            </xsl:if>
337
                            <xsl:if test="@code='f'">
338
                               <span property="manufacturer" typeOf="Organization">
339
                                    <span property="name" class="manufacturer_name">
340
                                        <xsl:value-of select="current()"/>
341
                                    </span>
342
                               </span>
343
                            </xsl:if>
344
                            <xsl:if test="@code='q'">
345
                               <span property="address" class="address">
346
                                        <xsl:value-of select="current()"/>
347
                               </span>
319
                            </xsl:if>
348
                            </xsl:if>
320
                            <xsl:if test="@code='g'">
349
                            <xsl:if test="@code='g'">
321
                                <xsl:call-template name="chopPunctuation">
350
                                <xsl:call-template name="chopPunctuation">
Lines 324-334 Link Here
324
                                   </xsl:with-param>
353
                                   </xsl:with-param>
325
                                </xsl:call-template>
354
                                </xsl:call-template>
326
                            </xsl:if>
355
                            </xsl:if>
327
                            <xsl:if test="position() != last()">
356
                            <xsl:if test="not($leader18='c' or $leader18='n')">
328
                                <xsl:text> </xsl:text>
357
                                <!-- if punctuation is added automatically do not add additional spaces -->
358
                                <xsl:if test="position() != last()">
359
                                    <xsl:text> </xsl:text>
360
                                </xsl:if>
329
                            </xsl:if>
361
                            </xsl:if>
330
                        </xsl:for-each>
362
                        </xsl:for-each>
331
                        <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
363
                        <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
364
                        <xsl:if test="$leader18='c' or $leader18='n'">
365
                           <!-- if punctuation is added automatically add the `.` at the end -->
366
                           <xsl:if test="position()=last()">
367
                               <xsl:text>.</xsl:text>
368
                           </xsl:if>
369
                        </xsl:if>
332
                    </xsl:for-each>
370
                    </xsl:for-each>
333
                </span>
371
                </span>
334
            </xsl:when>
372
            </xsl:when>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-2 / +34 lines)
Lines 32-37 Link Here
32
        <xsl:variable name="leader" select="marc:leader"/>
32
        <xsl:variable name="leader" select="marc:leader"/>
33
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
33
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
34
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
34
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
35
        <xsl:variable name="leader18" select="substring($leader,19,1)"/>
35
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
36
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
36
        <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
37
        <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
37
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
38
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
Lines 876-888 Link Here
876
                            <xsl:with-param name="codes">a</xsl:with-param>
877
                            <xsl:with-param name="codes">a</xsl:with-param>
877
                        </xsl:call-template>
878
                        </xsl:call-template>
878
                    </xsl:if>
879
                    </xsl:if>
879
                    <xsl:text> </xsl:text>
880
                    <xsl:if test="not($leader18='c' or $leader18='n')">
881
                        <xsl:text> </xsl:text>
882
                    </xsl:if>
883
880
                    <xsl:if test="marc:subfield[@code='b']">
884
                    <xsl:if test="marc:subfield[@code='b']">
881
                        <xsl:call-template name="subfieldSelect">
885
                        <xsl:call-template name="subfieldSelect">
882
                            <xsl:with-param name="codes">b</xsl:with-param>
886
                            <xsl:with-param name="codes">b</xsl:with-param>
883
                        </xsl:call-template>
887
                        </xsl:call-template>
884
                    </xsl:if>
888
                    </xsl:if>
885
                    <xsl:text> </xsl:text>
889
                    <xsl:if test="not($leader18='c' or $leader18='n')">
890
                        <xsl:text> </xsl:text>
891
                    </xsl:if>
892
893
894
                    <xsl:if test="marc:subfield[@code='e']">
895
                       <span property="location" class="manufacturer_place">
896
                                <xsl:value-of select="current()"/>
897
                       </span>
898
                    </xsl:if>
899
                    <xsl:if test="marc:subfield[@code='f']">
900
                       <span property="manufacturer" typeOf="Organization">
901
                            <span property="name" class="manufacturer_name">
902
                                <xsl:value-of select="current()"/>
903
                            </span>
904
                       </span>
905
                    </xsl:if>
906
                    <xsl:if test="marc:sugfield[@code='q']">
907
                       <span property="address" class="address">
908
                                <xsl:value-of select="current()"/>
909
                       </span>
910
                    </xsl:if>
911
886
                    <xsl:call-template name="chopPunctuation">
912
                    <xsl:call-template name="chopPunctuation">
887
                      <xsl:with-param name="chopString">
913
                      <xsl:with-param name="chopString">
888
                        <xsl:call-template name="subfieldSelect">
914
                        <xsl:call-template name="subfieldSelect">
Lines 891-896 Link Here
891
                       </xsl:with-param>
917
                       </xsl:with-param>
892
                    </xsl:call-template>
918
                    </xsl:call-template>
893
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
919
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
920
                    <xsl:if test="$leader18='c' or $leader18='n'">
921
                       <!-- if punctuation is added automatically add the `.` at the end -->
922
                       <xsl:if test="position()=last()">
923
                           <xsl:text>.</xsl:text>
924
                       </xsl:if>
925
                    </xsl:if>
894
                </xsl:for-each>
926
                </xsl:for-each>
895
            </span>
927
            </span>
896
        </xsl:when>
928
        </xsl:when>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-9 / +41 lines)
Lines 48-53 Link Here
48
        <xsl:variable name="leader" select="marc:leader"/>
48
        <xsl:variable name="leader" select="marc:leader"/>
49
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
49
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
50
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
50
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
51
        <xsl:variable name="leader18" select="substring($leader,19,1)"/>
51
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
52
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
52
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
53
        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
53
        <xsl:variable name="materialTypeCode">
54
        <xsl:variable name="materialTypeCode">
Lines 337-342 Link Here
337
                   <xsl:with-param name="show_url">1</xsl:with-param>
338
                   <xsl:with-param name="show_url">1</xsl:with-param>
338
                </xsl:call-template>
339
                </xsl:call-template>
339
            </xsl:when>
340
            </xsl:when>
341
340
            <xsl:when test="marc:datafield[@tag=260]">
342
            <xsl:when test="marc:datafield[@tag=260]">
341
             <span class="results_summary publisher"><span class="label">Publication details: </span>
343
             <span class="results_summary publisher"><span class="label">Publication details: </span>
342
                 <xsl:for-each select="marc:datafield[@tag=260]">
344
                 <xsl:for-each select="marc:datafield[@tag=260]">
Lines 344-359 Link Here
344
                         <xsl:if test="@code='a'">
346
                         <xsl:if test="@code='a'">
345
                             <span class="publisher_place" property="location">
347
                             <span class="publisher_place" property="location">
346
                                 <a>
348
                                 <a>
347
                                     <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
349
                                    <!-- do not trim `.` as it is used in abbreviations -->
348
                                     <xsl:value-of select="current()"/>
350
                                    <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
351
                                    <xsl:value-of select="current()"/>
349
                                 </a>
352
                                 </a>
350
                             </span>
353
                             </span>
351
                         </xsl:if>
354
                         </xsl:if>
352
                         <xsl:if test="@code='b'">
355
                         <xsl:if test="@code='b'">
353
                             <span property="publisher" typeof="Organization">
356
                             <span property="publisher" typeof="Organization">
354
                                 <span property="name" class="publisher_name">
357
                                 <span property="name" class="publisher_name">
355
                                     <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
358
                                     <a>
356
                                         <xsl:value-of select="current()"/>
359
                                        <!-- do not trim `.` as it is used in abbreviations -->
360
                                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
361
                                        <xsl:value-of select="current()"/>
357
                                    </a>
362
                                    </a>
358
                                 </span>
363
                                 </span>
359
                             </span>
364
                             </span>
Lines 361-371 Link Here
361
                         <xsl:if test="@code='c'">
366
                         <xsl:if test="@code='c'">
362
                             <span property="datePublished" class="publisher_date">
367
                             <span property="datePublished" class="publisher_date">
363
                                 <a>
368
                                 <a>
364
                                     <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
369
                                    <!-- do not trim `.` as it is used in abbreviations -->
365
                                     <xsl:value-of select="current()"/>
370
                                    <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
371
                                    <xsl:value-of select="current()"/>
366
                                 </a>
372
                                 </a>
367
                             </span>
373
                             </span>
368
                         </xsl:if>
374
                         </xsl:if>
375
                         <xsl:if test="@code='e'">
376
                            <span property="location" class="manufacturer_place">
377
                                     <xsl:value-of select="current()"/>
378
                            </span>
379
                         </xsl:if>
380
                         <xsl:if test="@code='f'">
381
                            <span property="manufacturer" typeOf="Organization">
382
                                 <span property="name" class="manufacturer_name">
383
                                     <xsl:value-of select="current()"/>
384
                                 </span>
385
                            </span>
386
                         </xsl:if>
387
                         <xsl:if test="@code='q'">
388
                            <span property="address" class="address">
389
                                     <xsl:value-of select="current()"/>
390
                            </span>
391
                         </xsl:if>
369
                         <xsl:if test="@code='g'">
392
                         <xsl:if test="@code='g'">
370
                            <span property="datePublished" class="publisher_date">
393
                            <span property="datePublished" class="publisher_date">
371
                               <xsl:call-template name="chopPunctuation">
394
                               <xsl:call-template name="chopPunctuation">
Lines 375-385 Link Here
375
                                </xsl:call-template>
398
                                </xsl:call-template>
376
                            </span>
399
                            </span>
377
                         </xsl:if>
400
                         </xsl:if>
378
                         <xsl:if test="position() != last()">
401
                         <xsl:if test="not($leader18='c' or $leader18='n')">
379
                             <xsl:text> </xsl:text>
402
                             <!-- if punctuation is added automatically do not add additional spaces -->
380
                         </xsl:if>
403
                             <xsl:if test="position() != last()">
404
                                 <xsl:text> </xsl:text>
405
                             </xsl:if>
406
                        </xsl:if>
381
                     </xsl:for-each>
407
                     </xsl:for-each>
382
                     <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
408
                     <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
409
                     <xsl:if test="$leader18='c' or $leader18='n'">
410
                        <!-- if punctuation is added automatically add the `.` at the end -->
411
                        <xsl:if test="position()=last()">
412
                            <xsl:text>.</xsl:text>
413
                        </xsl:if>
414
                     </xsl:if>
383
                 </xsl:for-each>
415
                 </xsl:for-each>
384
             </span>
416
             </span>
385
            </xsl:when>
417
            </xsl:when>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-3 / +34 lines)
Lines 45-50 Link Here
45
        <xsl:variable name="leader" select="marc:leader"/>
45
        <xsl:variable name="leader" select="marc:leader"/>
46
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
46
        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
47
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
47
        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
48
        <xsl:variable name="leader18" select="substring($leader,19,1)"/>
48
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
49
        <xsl:variable name="leader19" select="substring($leader,20,1)"/>
49
        <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
50
        <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
50
        <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/>
51
        <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/>
Lines 1099-1105 Link Here
1099
                            </xsl:call-template>
1100
                            </xsl:call-template>
1100
                        </span>
1101
                        </span>
1101
                    </xsl:if>
1102
                    </xsl:if>
1102
                    <xsl:text> </xsl:text>
1103
                    <xsl:if test="not($leader18='c' or $leader18='n')">
1104
                        <xsl:text> </xsl:text>
1105
                    </xsl:if>
1106
1103
                    <xsl:if test="marc:subfield[@code='b']">
1107
                    <xsl:if test="marc:subfield[@code='b']">
1104
                        <span property="name" class="publisher_name">
1108
                        <span property="name" class="publisher_name">
1105
                            <xsl:call-template name="subfieldSelect">
1109
                            <xsl:call-template name="subfieldSelect">
Lines 1107-1113 Link Here
1107
                            </xsl:call-template>
1111
                            </xsl:call-template>
1108
                        </span>
1112
                        </span>
1109
                    </xsl:if>
1113
                    </xsl:if>
1110
                    <xsl:text> </xsl:text>
1114
                    <xsl:if test="not($leader18='c' or $leader18='n')">
1115
                        <xsl:text> </xsl:text>
1116
                    </xsl:if>
1117
1118
                    <xsl:if test="marc:subfield[@code='e']">
1119
                       <span property="location" class="manufacturer_place">
1120
                                <xsl:value-of select="current()"/>
1121
                       </span>
1122
                    </xsl:if>
1123
                    <xsl:if test="marc:subfield[@code='f']">
1124
                       <span property="manufacturer" typeOf="Organization">
1125
                            <span property="name" class="manufacturer_name">
1126
                                <xsl:value-of select="current()"/>
1127
                            </span>
1128
                       </span>
1129
                    </xsl:if>
1130
                    <xsl:if test="marc:sugfield[@code='q']">
1131
                       <span property="address" class="address">
1132
                                <xsl:value-of select="current()"/>
1133
                       </span>
1134
                    </xsl:if>
1135
1111
                    <span property="datePublished" class="publisher_date">
1136
                    <span property="datePublished" class="publisher_date">
1112
                        <xsl:call-template name="chopPunctuation">
1137
                        <xsl:call-template name="chopPunctuation">
1113
                            <xsl:with-param name="chopString">
1138
                            <xsl:with-param name="chopString">
Lines 1117-1123 Link Here
1117
                            </xsl:with-param>
1142
                            </xsl:with-param>
1118
                        </xsl:call-template>
1143
                        </xsl:call-template>
1119
                    </span>
1144
                    </span>
1145
1120
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1146
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1147
                    <xsl:if test="$leader18='c' or $leader18='n'">
1148
                       <!-- if punctuation is added automatically add the `.` at the end -->
1149
                       <xsl:if test="position()=last()">
1150
                           <xsl:text>.</xsl:text>
1151
                       </xsl:if>
1152
                    </xsl:if>
1121
                </xsl:for-each>
1153
                </xsl:for-each>
1122
                <xsl:if test="marc:datafield[@tag=264]">
1154
                <xsl:if test="marc:datafield[@tag=264]">
1123
                    <xsl:text>; </xsl:text>
1155
                    <xsl:text>; </xsl:text>
1124
- 

Return to bug 37325