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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-87 / +85 lines)
Lines 408-414 Link Here
408
        <xsl:param name="UseControlNumber"/>
408
        <xsl:param name="UseControlNumber"/>
409
        <xsl:param name="UseAuthoritiesForTracings"/>
409
        <xsl:param name="UseAuthoritiesForTracings"/>
410
        <!-- Series -->
410
        <!-- Series -->
411
        <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
411
        <xsl:if test="marc:datafield[@tag=440 or @tag=490 or @tag=800 or @tag=801 or @tag=811 or @tag=830]">
412
        <span class="results_summary series"><span class="label">Series: </span>
412
        <span class="results_summary series"><span class="label">Series: </span>
413
        <!-- 440 -->
413
        <!-- 440 -->
414
        <xsl:for-each select="marc:datafield[@tag=440 and @ind1!='z']">
414
        <xsl:for-each select="marc:datafield[@tag=440 and @ind1!='z']">
Lines 459-551 Link Here
459
                <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
459
                <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
460
            </xsl:choose>
460
            </xsl:choose>
461
        </xsl:for-each>
461
        </xsl:for-each>
462
        <!-- 490 Series traced, Ind1 = 1 -->
462
        <!-- 800,810,811,830 always display. -->
463
        <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
463
        <xsl:for-each select="marc:datafield[(@tag=800 or @tag=810 or @tag=811) and @ind1!='z']">
464
            <xsl:for-each select="marc:datafield[(@tag=800 or @tag=810 or @tag=811) and @ind1!='z']">
464
            <xsl:choose>
465
                <xsl:choose>
465
                <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
466
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
466
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
467
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
467
                        <xsl:call-template name="chopPunctuation">
468
                            <xsl:call-template name="chopPunctuation">
468
                            <xsl:with-param name="chopString">
469
                                <xsl:with-param name="chopString">
469
                                <xsl:call-template name="subfieldSelect">
470
                                    <xsl:call-template name="subfieldSelect">
470
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
471
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
471
                                </xsl:call-template>
472
                                    </xsl:call-template>
472
                            </xsl:with-param>
473
                                </xsl:with-param>
473
                        </xsl:call-template>
474
                            </xsl:call-template>
474
                    </a>
475
                        </a>
475
                </xsl:when>
476
                    </xsl:when>
476
                <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
477
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
477
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
478
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
478
                        <xsl:call-template name="chopPunctuation">
479
                            <xsl:call-template name="chopPunctuation">
479
                            <xsl:with-param name="chopString">
480
                                <xsl:with-param name="chopString">
480
                                <xsl:call-template name="subfieldSelect">
481
                                    <xsl:call-template name="subfieldSelect">
481
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
482
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
482
                                </xsl:call-template>
483
                                    </xsl:call-template>
483
                            </xsl:with-param>
484
                                </xsl:with-param>
484
                        </xsl:call-template>
485
                            </xsl:call-template>
485
                    </a>
486
                        </a>
486
                </xsl:when>
487
                    </xsl:when>
487
                <xsl:otherwise>
488
                    <xsl:otherwise>
488
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&amp;q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
489
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&amp;q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
489
                        <xsl:call-template name="chopPunctuation">
490
                            <xsl:call-template name="chopPunctuation">
490
                            <xsl:with-param name="chopString">
491
                                <xsl:with-param name="chopString">
491
                                <xsl:call-template name="subfieldSelect">
492
                                    <xsl:call-template name="subfieldSelect">
492
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
493
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
493
                                </xsl:call-template>
494
                                    </xsl:call-template>
494
                            </xsl:with-param>
495
                                </xsl:with-param>
495
                        </xsl:call-template>
496
                            </xsl:call-template>
496
                    </a>
497
                        </a>
497
                </xsl:otherwise>
498
                    </xsl:otherwise>
498
            </xsl:choose>
499
                </xsl:choose>
499
            <xsl:call-template name="part"/>
500
                <xsl:call-template name="part"/>
500
            <xsl:text> ; </xsl:text>
501
                <xsl:text> ; </xsl:text>
501
            <xsl:value-of  select="marc:subfield[@code='v']" />
502
                <xsl:value-of  select="marc:subfield[@code='v']" />
502
        <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
503
            <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
503
        </xsl:for-each>
504
            </xsl:for-each>
505
504
506
            <xsl:for-each select="marc:datafield[@tag=830 and @ind1!='z']">
505
        <xsl:for-each select="marc:datafield[@tag=830 and @ind1!='z']">
507
                <xsl:choose>
506
            <xsl:choose>
508
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
507
                <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
509
                        <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
508
                    <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
510
                            <xsl:call-template name="chopPunctuation">
509
                        <xsl:call-template name="chopPunctuation">
511
                                <xsl:with-param name="chopString">
510
                            <xsl:with-param name="chopString">
512
                                    <xsl:call-template name="subfieldSelect">
511
                                <xsl:call-template name="subfieldSelect">
513
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
512
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
514
                                    </xsl:call-template>
513
                                </xsl:call-template>
515
                                </xsl:with-param>
514
                            </xsl:with-param>
516
                            </xsl:call-template>
515
                        </xsl:call-template>
517
                        </a>
516
                    </a>
518
                    </xsl:when>
517
                </xsl:when>
519
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
518
                <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
520
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
519
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
521
                            <xsl:call-template name="chopPunctuation">
520
                        <xsl:call-template name="chopPunctuation">
522
                                <xsl:with-param name="chopString">
521
                            <xsl:with-param name="chopString">
523
                                    <xsl:call-template name="subfieldSelect">
522
                                <xsl:call-template name="subfieldSelect">
524
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
523
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
525
                                    </xsl:call-template>
524
                                </xsl:call-template>
526
                                </xsl:with-param>
525
                            </xsl:with-param>
527
                            </xsl:call-template>
526
                        </xsl:call-template>
528
                        </a>
527
                    </a>
529
                    </xsl:when>
528
                </xsl:when>
530
                    <xsl:otherwise>
529
                <xsl:otherwise>
531
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
530
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
532
                            <xsl:call-template name="chopPunctuation">
531
                        <xsl:call-template name="chopPunctuation">
533
                                <xsl:with-param name="chopString">
532
                            <xsl:with-param name="chopString">
534
                                    <xsl:call-template name="subfieldSelect">
533
                                <xsl:call-template name="subfieldSelect">
535
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
534
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
536
                                    </xsl:call-template>
535
                                </xsl:call-template>
537
                                </xsl:with-param>
536
                            </xsl:with-param>
538
                            </xsl:call-template>
537
                        </xsl:call-template>
539
                        </a>
538
                    </a>
540
                    </xsl:otherwise>
539
                </xsl:otherwise>
541
                </xsl:choose>
540
            </xsl:choose>
542
                <xsl:call-template name="part"/>
541
            <xsl:call-template name="part"/>
543
                <xsl:if test="marc:subfield[@code='v']">
542
            <xsl:if test="marc:subfield[@code='v']">
544
                    <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" />
543
                <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" />
545
                </xsl:if>
544
            </xsl:if>
546
            <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
545
        <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
547
            </xsl:for-each>
546
        </xsl:for-each>
548
        </xsl:if>
549
547
550
        </span>
548
        </span>
551
        </xsl:if>
549
        </xsl:if>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl (-88 / +85 lines)
Lines 372-378 Link Here
372
        <xsl:param name="UseControlNumber"/>
372
        <xsl:param name="UseControlNumber"/>
373
        <xsl:param name="UseAuthoritiesForTracings"/>
373
        <xsl:param name="UseAuthoritiesForTracings"/>
374
        <!-- Series -->
374
        <!-- Series -->
375
        <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
375
        <xsl:if test="marc:datafield[@tag=440 or @tag=490 or @tag=800 or @tag=810 or @tag=811 or @tag=830]">
376
        <span class="results_summary series"><span class="label">Series: </span>
376
        <span class="results_summary series"><span class="label">Series: </span>
377
        <!-- 440 -->
377
        <!-- 440 -->
378
        <xsl:for-each select="marc:datafield[@tag=440 and @ind1!='z']">
378
        <xsl:for-each select="marc:datafield[@tag=440 and @ind1!='z']">
Lines 423-515 Link Here
423
                <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
423
                <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
424
            </xsl:choose>
424
            </xsl:choose>
425
        </xsl:for-each>
425
        </xsl:for-each>
426
        <!-- 490 Series traced, Ind1 = 1 -->
426
        <!-- 800,810,811,830 always display. -->
427
        <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
427
        <xsl:for-each select="marc:datafield[(@tag=800 or @tag=810 or @tag=811) and @ind1!='z']">
428
            <xsl:for-each select="marc:datafield[(@tag=800 or @tag=810 or @tag=811) and @ind1!='z']">
428
            <xsl:choose>
429
                <xsl:choose>
429
                <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
430
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
430
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
431
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
431
                        <xsl:call-template name="chopPunctuation">
432
                            <xsl:call-template name="chopPunctuation">
432
                            <xsl:with-param name="chopString">
433
                                <xsl:with-param name="chopString">
433
                                <xsl:call-template name="subfieldSelect">
434
                                    <xsl:call-template name="subfieldSelect">
434
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
435
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
435
                                </xsl:call-template>
436
                                    </xsl:call-template>
436
                            </xsl:with-param>
437
                                </xsl:with-param>
437
                        </xsl:call-template>
438
                            </xsl:call-template>
438
                    </a>
439
                        </a>
439
                </xsl:when>
440
                    </xsl:when>
440
                <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
441
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
441
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
442
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
442
                        <xsl:call-template name="chopPunctuation">
443
                            <xsl:call-template name="chopPunctuation">
443
                            <xsl:with-param name="chopString">
444
                                <xsl:with-param name="chopString">
444
                                <xsl:call-template name="subfieldSelect">
445
                                    <xsl:call-template name="subfieldSelect">
445
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
446
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
446
                                </xsl:call-template>
447
                                    </xsl:call-template>
447
                            </xsl:with-param>
448
                                </xsl:with-param>
448
                        </xsl:call-template>
449
                            </xsl:call-template>
449
                    </a>
450
                        </a>
450
                </xsl:when>
451
                    </xsl:when>
451
                <xsl:otherwise>
452
                    <xsl:otherwise>
452
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&amp;q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
453
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&amp;q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
453
                        <xsl:call-template name="chopPunctuation">
454
                            <xsl:call-template name="chopPunctuation">
454
                            <xsl:with-param name="chopString">
455
                                <xsl:with-param name="chopString">
455
                                <xsl:call-template name="subfieldSelect">
456
                                    <xsl:call-template name="subfieldSelect">
456
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
457
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
457
                                </xsl:call-template>
458
                                    </xsl:call-template>
458
                            </xsl:with-param>
459
                                </xsl:with-param>
459
                        </xsl:call-template>
460
                            </xsl:call-template>
460
                    </a>
461
                        </a>
461
                </xsl:otherwise>
462
                    </xsl:otherwise>
462
            </xsl:choose>
463
                </xsl:choose>
463
            <xsl:call-template name="part"/>
464
                <xsl:call-template name="part"/>
464
            <xsl:text> ; </xsl:text>
465
                <xsl:text> ; </xsl:text>
465
            <xsl:value-of  select="marc:subfield[@code='v']" />
466
                <xsl:value-of  select="marc:subfield[@code='v']" />
466
        <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
467
            <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
467
        </xsl:for-each>
468
            </xsl:for-each>
469
468
470
            <xsl:for-each select="marc:datafield[@tag=830 and @ind1!='z']">
469
        <xsl:for-each select="marc:datafield[@tag=830 and @ind1!='z']">
471
                <xsl:choose>
470
            <xsl:choose>
472
                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
471
                <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
473
                        <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
472
                    <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
474
                            <xsl:call-template name="chopPunctuation">
473
                        <xsl:call-template name="chopPunctuation">
475
                                <xsl:with-param name="chopString">
474
                            <xsl:with-param name="chopString">
476
                                    <xsl:call-template name="subfieldSelect">
475
                                <xsl:call-template name="subfieldSelect">
477
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
476
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
478
                                    </xsl:call-template>
477
                                </xsl:call-template>
479
                                </xsl:with-param>
478
                            </xsl:with-param>
480
                            </xsl:call-template>
479
                        </xsl:call-template>
481
                        </a>
480
                    </a>
482
                    </xsl:when>
481
                </xsl:when>
483
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
482
                <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
484
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
483
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
485
                            <xsl:call-template name="chopPunctuation">
484
                        <xsl:call-template name="chopPunctuation">
486
                                <xsl:with-param name="chopString">
485
                            <xsl:with-param name="chopString">
487
                                    <xsl:call-template name="subfieldSelect">
486
                                <xsl:call-template name="subfieldSelect">
488
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
487
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
489
                                    </xsl:call-template>
488
                                </xsl:call-template>
490
                                </xsl:with-param>
489
                            </xsl:with-param>
491
                            </xsl:call-template>
490
                        </xsl:call-template>
492
                        </a>
491
                    </a>
493
                    </xsl:when>
492
                </xsl:when>
494
                    <xsl:otherwise>
493
                <xsl:otherwise>
495
                        <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
494
                    <a><xsl:attribute name="href"><xsl:value-of select="$searchurl"/>?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
496
                            <xsl:call-template name="chopPunctuation">
495
                        <xsl:call-template name="chopPunctuation">
497
                                <xsl:with-param name="chopString">
496
                            <xsl:with-param name="chopString">
498
                                    <xsl:call-template name="subfieldSelect">
497
                                <xsl:call-template name="subfieldSelect">
499
                                        <xsl:with-param name="codes">a_t</xsl:with-param>
498
                                    <xsl:with-param name="codes">a_t</xsl:with-param>
500
                                    </xsl:call-template>
499
                                </xsl:call-template>
501
                                </xsl:with-param>
500
                            </xsl:with-param>
502
                            </xsl:call-template>
501
                        </xsl:call-template>
503
                        </a>
502
                    </a>
504
                    </xsl:otherwise>
503
                </xsl:otherwise>
505
                </xsl:choose>
504
            </xsl:choose>
506
                <xsl:call-template name="part"/>
505
            <xsl:call-template name="part"/>
507
                <xsl:if test="marc:subfield[@code='v']">
506
            <xsl:if test="marc:subfield[@code='v']">
508
                    <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" />
507
                <xsl:text> ; </xsl:text><xsl:value-of select="marc:subfield[@code='v']" />
509
                </xsl:if>
508
            </xsl:if>
510
            <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
509
        <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"> | </span></xsl:otherwise></xsl:choose>
511
            </xsl:for-each>
510
        </xsl:for-each>
512
        </xsl:if>
513
511
514
        </span>
512
        </span>
515
        </xsl:if>
513
        </xsl:if>
516
- 

Return to bug 13600