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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-36 / +97 lines)
Lines 1384-1424 Link Here
1384
                       <xsl:text>). </xsl:text>                   </span>
1384
                       <xsl:text>). </xsl:text>                   </span>
1385
                   </xsl:if>
1385
                   </xsl:if>
1386
               </span>
1386
               </span>
1387
    <xsl:choose>
1387
1388
        <xsl:when test="($OPACItemLocation='location' or $OPACItemLocation='ccode') and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)">
1388
        <xsl:choose>
1389
            <span class="results_summary location">
1389
            <xsl:when test="$OPACItemLocation='location' and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)">
1390
                <span class="label">Location(s): </span>
1390
                <span class="results_summary location">
1391
                <xsl:choose>
1391
                    <span class="label">Location(s): </span>
1392
                <xsl:when test="count(key('item-by-status', 'available'))>0">
1392
                    <xsl:choose>
1393
                    <span class="available">
1393
                        <xsl:when test="count(key('item-by-status', 'available'))>0">
1394
                        <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
1394
                            <span class="available">
1395
                        <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1395
                                <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
1396
                            <xsl:choose>
1396
                                <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1397
                                <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when>
1397
                                    <b><xsl:value-of select="concat(items:location,' ')"/></b>
1398
                                <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when>
1398
                                    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
1399
                            </xsl:choose>
1399
                                        <span class="CallNumber">[<xsl:value-of select="items:itemcallnumber"/>]</span>
1400
                            <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"><span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span></xsl:if>
1400
                                    </xsl:if>
1401
                            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1401
                                    <xsl:choose>
1402
                        </xsl:for-each>
1402
                                        <xsl:when test="position()=last()">
1403
                    </span>
1403
                                            <xsl:text>. </xsl:text>
1404
                </xsl:when>
1404
                                        </xsl:when>
1405
                <xsl:when test="count(key('item-by-status', 'reference'))>0">
1405
                                        <xsl:otherwise>
1406
                    <span class="available">
1406
                                            <xsl:text>, </xsl:text>
1407
                        <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1407
                                        </xsl:otherwise>
1408
                        <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1408
                                    </xsl:choose>
1409
                            <xsl:choose>
1409
                                </xsl:for-each>
1410
                                <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when>
1410
                            </span>
1411
                                <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when>
1411
                        </xsl:when>
1412
                            </xsl:choose>
1412
                        <xsl:when test="count(key('item-by-status', 'reference'))>0">
1413
                            <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"><span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span></xsl:if>
1413
                            <span class="available">
1414
                            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1414
                                <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1415
                        </xsl:for-each>
1415
                                <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1416
                    </span>
1416
                                    <b><xsl:value-of select="concat(items:location,' ')"/></b>
1417
                </xsl:when>
1417
                                    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
1418
                </xsl:choose>
1418
                                        <span class="CallNumber">[<xsl:value-of select="items:itemcallnumber"/>]</span>
1419
            </span>
1419
                                    </xsl:if>
1420
        </xsl:when>
1420
                                    <xsl:choose>
1421
       </xsl:choose>
1421
                                        <xsl:when test="position()=last()">
1422
                                            <xsl:text>. </xsl:text>
1423
                                        </xsl:when>
1424
                                        <xsl:otherwise>
1425
                                            <xsl:text>, </xsl:text>
1426
                                        </xsl:otherwise>
1427
                                    </xsl:choose>
1428
                                </xsl:for-each>
1429
                            </span>
1430
                        </xsl:when>
1431
                    </xsl:choose>
1432
                </span>
1433
            </xsl:when>
1434
        </xsl:choose>
1435
1436
        <xsl:choose>
1437
            <xsl:when test="$OPACItemLocation='ccode' and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)">
1438
                <span class="results_summary location">
1439
                    <span class="label">Collection(s): </span>
1440
                    <xsl:choose>
1441
                        <xsl:when test="count(key('item-by-status', 'available'))>0">
1442
                            <span class="available">
1443
                                <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
1444
                                <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1445
                                    <b><xsl:value-of select="concat(items:ccode,' ')"/></b>
1446
                                    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
1447
                                        <span class="CallNumber">[<xsl:value-of select="items:itemcallnumber"/>]</span>
1448
                                    </xsl:if>
1449
                                    <xsl:choose>
1450
                                        <xsl:when test="position()=last()">
1451
                                            <xsl:text>. </xsl:text>
1452
                                        </xsl:when>
1453
                                        <xsl:otherwise>
1454
                                            <xsl:text>, </xsl:text>
1455
                                        </xsl:otherwise>
1456
                                    </xsl:choose>
1457
                                </xsl:for-each>
1458
                            </span>
1459
                        </xsl:when>
1460
                        <xsl:when test="count(key('item-by-status', 'reference'))>0">
1461
                            <span class="available">
1462
                                <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1463
                                <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1464
                                    <b><xsl:value-of select="concat(items:ccode,' ')"/></b>
1465
                                    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
1466
                                        <span class="CallNumber">[<xsl:value-of select="items:itemcallnumber"/>]</span>
1467
                                    </xsl:if>
1468
                                    <xsl:choose>
1469
                                        <xsl:when test="position()=last()">
1470
                                            <xsl:text>. </xsl:text>
1471
                                        </xsl:when>
1472
                                        <xsl:otherwise>
1473
                                            <xsl:text>, </xsl:text>
1474
                                        </xsl:otherwise>
1475
                                    </xsl:choose>
1476
                                </xsl:for-each>
1477
                            </span>
1478
                        </xsl:when>
1479
                    </xsl:choose>
1480
                </span>
1481
            </xsl:when>
1482
        </xsl:choose>
1483
1422
    </xsl:template>
1484
    </xsl:template>
1423
1485
1424
    <xsl:template name="nameABCQ">
1486
    <xsl:template name="nameABCQ">
1425
- 

Return to bug 24352