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/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-14 / +32 lines)
Lines 239-250 Link Here
239
         helper named-template -->
239
         helper named-template -->
240
    <!-- Amended  to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record)  -->
240
    <!-- Amended  to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record)  -->
241
        <xsl:param name="show_url"/>
241
        <xsl:param name="show_url"/>
242
        <xsl:variable name="leader" select="marc:leader"/>
243
        <xsl:variable name="leader18" select="substring($leader,19,1)"/>
242
        <xsl:choose>
244
        <xsl:choose>
243
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
245
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
244
                <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
246
                <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
245
                    <xsl:call-template name="showRDAtag264helper">
247
                    <xsl:call-template name="showRDAtag264helper">
246
                        <xsl:with-param name="field" select="."/>
248
                        <xsl:with-param name="field" select="."/>
247
                        <xsl:with-param name="url" select="$show_url"/>
249
                        <xsl:with-param name="url" select="$show_url"/>
250
                        <xsl:with-param name="leader18" select="$leader18"/>
248
                    </xsl:call-template>
251
                    </xsl:call-template>
249
                </xsl:for-each>
252
                </xsl:for-each>
250
            </xsl:when>
253
            </xsl:when>
Lines 253-266 Link Here
253
                    <xsl:call-template name="showRDAtag264helper">
256
                    <xsl:call-template name="showRDAtag264helper">
254
                        <xsl:with-param name="field" select="."/>
257
                        <xsl:with-param name="field" select="."/>
255
                        <xsl:with-param name="url" select="$show_url"/>
258
                        <xsl:with-param name="url" select="$show_url"/>
259
                        <xsl:with-param name="leader18" select="$leader18"/>
256
                    </xsl:call-template>
260
                    </xsl:call-template>
257
                </xsl:for-each>
261
                </xsl:for-each>
258
            </xsl:otherwise>
262
            </xsl:otherwise>
259
        </xsl:choose>
263
        </xsl:choose>
260
    </xsl:template>
264
    </xsl:template>
265
261
    <xsl:template name="showRDAtag264helper">
266
    <xsl:template name="showRDAtag264helper">
262
        <xsl:param name="field"/>
267
        <xsl:param name="field"/>
263
        <xsl:param name="url"/>
268
        <xsl:param name="url"/>
269
        <xsl:param name="leader18"/>
264
        <xsl:variable name="ind2" select="$field/@ind2"/>
270
        <xsl:variable name="ind2" select="$field/@ind2"/>
265
        <span class="results_summary rda264">
271
        <span class="results_summary rda264">
266
            <xsl:choose>
272
            <xsl:choose>
Lines 284-306 Link Here
284
            <xsl:for-each select="marc:subfield">
290
            <xsl:for-each select="marc:subfield">
285
                <xsl:if test="@code='a'">
291
                <xsl:if test="@code='a'">
286
                    <span class="rda264_place" property="location">
292
                    <span class="rda264_place" property="location">
287
                        <xsl:value-of select="current()"/>
293
                        <xsl:choose>
294
                            <xsl:when test="$url='1'">
295
                                     <a>
296
                                     <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
297
                                     <xsl:value-of select="current()"/>
298
                                     </a>
299
                            </xsl:when>
300
                            <xsl:otherwise>
301
                                    <xsl:value-of select="current()"/>
302
                            </xsl:otherwise>
303
                        </xsl:choose>
288
                    </span>
304
                    </span>
289
                </xsl:if>
305
                </xsl:if>
290
                <xsl:if test="@code='b'">
306
                <xsl:if test="@code='b'">
291
                     <span property="rda264_name" typeof="Organization">
307
                     <span property="rda264_name" typeof="Organization">
292
                         <span property="name" class="rda264_name">
308
                         <span property="name" class="rda264_name">
293
                            <xsl:choose>
309
                        <xsl:choose>
294
                                <xsl:when test="$url='1'">
310
                            <xsl:when test="$url='1'">
295
                                         <a>
311
                                     <a>
296
                                         <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
312
                                     <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
297
                                         <xsl:value-of select="current()"/>
313
                                     <xsl:value-of select="current()"/>
298
                                         </a>
314
                                     </a>
299
                                </xsl:when>
315
                            </xsl:when>
300
                                <xsl:otherwise>
316
                            <xsl:otherwise>
301
                                        <xsl:value-of select="current()"/>
317
                                    <xsl:value-of select="current()"/>
302
                                </xsl:otherwise>
318
                            </xsl:otherwise>
303
                            </xsl:choose>
319
                        </xsl:choose>
304
                         </span>
320
                         </span>
305
                     </span>
321
                     </span>
306
                </xsl:if>
322
                </xsl:if>
Lines 313-320 Link Here
313
                        </xsl:call-template>
329
                        </xsl:call-template>
314
                    </span>
330
                    </span>
315
                </xsl:if>
331
                </xsl:if>
316
                <xsl:if test="position() != last()">
332
                <xsl:if test="not($leader18='c' or $leader18='n')">
317
                    <xsl:text> </xsl:text>
333
                    <xsl:if test="position() != last()">
334
                        <xsl:text> </xsl:text>
335
                    </xsl:if>
318
                </xsl:if>
336
                </xsl:if>
319
            </xsl:for-each>
337
            </xsl:for-each>
320
        </span>
338
        </span>
(-)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 (-2 / +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>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl (-15 / +32 lines)
Lines 237-248 Link Here
237
         helper named-template -->
237
         helper named-template -->
238
        <!-- Amended  to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record)  -->
238
        <!-- Amended  to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record)  -->
239
        <xsl:param name="show_url"/>
239
        <xsl:param name="show_url"/>
240
        <xsl:variable name="leader" select="marc:leader"/>
241
        <xsl:variable name="leader18" select="substring($leader,19,1)"/>
240
        <xsl:choose>
242
        <xsl:choose>
241
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
243
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
242
                <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
244
                <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
243
                    <xsl:call-template name="showRDAtag264helper">
245
                    <xsl:call-template name="showRDAtag264helper">
244
                        <xsl:with-param name="field" select="."/>
246
                        <xsl:with-param name="field" select="."/>
245
                        <xsl:with-param name="url" select="$show_url"/>
247
                        <xsl:with-param name="url" select="$show_url"/>
248
                        <xsl:with-param name="leader18" select="$leader18"/>
246
                    </xsl:call-template>
249
                    </xsl:call-template>
247
                </xsl:for-each>
250
                </xsl:for-each>
248
            </xsl:when>
251
            </xsl:when>
Lines 251-264 Link Here
251
                    <xsl:call-template name="showRDAtag264helper">
254
                    <xsl:call-template name="showRDAtag264helper">
252
                        <xsl:with-param name="field" select="."/>
255
                        <xsl:with-param name="field" select="."/>
253
                        <xsl:with-param name="url" select="$show_url"/>
256
                        <xsl:with-param name="url" select="$show_url"/>
257
                        <xsl:with-param name="leader18" select="$leader18"/>
254
                    </xsl:call-template>
258
                    </xsl:call-template>
255
                </xsl:for-each>
259
                </xsl:for-each>
256
            </xsl:otherwise>
260
            </xsl:otherwise>
257
        </xsl:choose>
261
        </xsl:choose>
258
    </xsl:template>
262
    </xsl:template>
263
259
    <xsl:template name="showRDAtag264helper">
264
    <xsl:template name="showRDAtag264helper">
260
        <xsl:param name="field"/>
265
        <xsl:param name="field"/>
261
        <xsl:param name="url"/>
266
        <xsl:param name="url"/>
267
        <xsl:param name="leader18"/>
262
        <xsl:variable name="ind2" select="$field/@ind2"/>
268
        <xsl:variable name="ind2" select="$field/@ind2"/>
263
        <span class="results_summary rda264">
269
        <span class="results_summary rda264">
264
            <xsl:choose>
270
            <xsl:choose>
Lines 282-304 Link Here
282
            <xsl:for-each select="marc:subfield">
288
            <xsl:for-each select="marc:subfield">
283
                <xsl:if test="@code='a'">
289
                <xsl:if test="@code='a'">
284
                    <span class="rda264_place" property="location">
290
                    <span class="rda264_place" property="location">
285
                        <xsl:value-of select="current()"/>
291
                        <xsl:choose>
292
                            <xsl:when test="$url='1'">
293
                                     <a>
294
                                     <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
295
                                     <xsl:value-of select="current()"/>
296
                                     </a>
297
                            </xsl:when>
298
                            <xsl:otherwise>
299
                                    <xsl:value-of select="current()"/>
300
                            </xsl:otherwise>
301
                        </xsl:choose>
286
                    </span>
302
                    </span>
287
                </xsl:if>
303
                </xsl:if>
288
                <xsl:if test="@code='b'">
304
                <xsl:if test="@code='b'">
289
                     <span property="rda264_name" typeof="Organization">
305
                     <span property="rda264_name" typeof="Organization">
290
                         <span property="name" class="rda264_name">
306
                         <span property="name" class="rda264_name">
291
                            <xsl:choose>
307
                        <xsl:choose>
292
                                <xsl:when test="$url='1'">
308
                            <xsl:when test="$url='1'">
293
                                         <a>
309
                                     <a>
294
                                         <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
310
                                     <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(normalize-space(translate(current(), ',;/:', '')), true())"/>"</xsl:attribute>
295
                                         <xsl:value-of select="current()"/>
311
                                     <xsl:value-of select="current()"/>
296
                                         </a>
312
                                     </a>
297
                                </xsl:when>
313
                            </xsl:when>
298
                                <xsl:otherwise>
314
                            <xsl:otherwise>
299
                                        <xsl:value-of select="current()"/>
315
                                    <xsl:value-of select="current()"/>
300
                                </xsl:otherwise>
316
                            </xsl:otherwise>
301
                            </xsl:choose>
317
                        </xsl:choose>
302
                         </span>
318
                         </span>
303
                     </span>
319
                     </span>
304
                </xsl:if>
320
                </xsl:if>
Lines 311-318 Link Here
311
                        </xsl:call-template>
327
                        </xsl:call-template>
312
                    </span>
328
                    </span>
313
                </xsl:if>
329
                </xsl:if>
314
                <xsl:if test="position() != last()">
330
                <xsl:if test="not($leader18='c' or $leader18='n')">
315
                    <xsl:text> </xsl:text>
331
                    <xsl:if test="position() != last()">
332
                        <xsl:text> </xsl:text>
333
                    </xsl:if>
316
                </xsl:if>
334
                </xsl:if>
317
            </xsl:for-each>
335
            </xsl:for-each>
318
        </span>
336
        </span>
319
- 

Return to bug 37325