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

(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 169-175 sub get_xslt_sysprefs { Link Here
169
                              TrackClicks opacthemes IdRef OpacSuppression
169
                              TrackClicks opacthemes IdRef OpacSuppression
170
                              OPACResultsLibrary OPACShowOpenURL
170
                              OPACResultsLibrary OPACShowOpenURL
171
                              OpenURLResolverURL OpenURLImageLocation
171
                              OpenURLResolverURL OpenURLImageLocation
172
                              OPACResultsMaxItems OPACResultsMaxItemsUnavailable
172
                              OPACResultsMaxItems OPACResultsMaxItemsUnavailable OPACResultsUnavailableGroupingBy
173
                              OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / )
173
                              OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / )
174
    {
174
    {
175
        my $sp = C4::Context->preference( $syspref );
175
        my $sp = C4::Context->preference( $syspref );
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-30 / +36 lines)
Lines 25-30 Link Here
25
25
26
    <xsl:variable name="OPACResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='OPACResultsMaxItems']+0)"/>
26
    <xsl:variable name="OPACResultsMaxItems" select="number(marc:sysprefs/marc:syspref[@name='OPACResultsMaxItems']+0)"/>
27
    <xsl:variable name="OPACResultsMaxItemsUnavailable" select="number(marc:sysprefs/marc:syspref[@name='OPACResultsMaxItemsUnavailable']+0)"/>
27
    <xsl:variable name="OPACResultsMaxItemsUnavailable" select="number(marc:sysprefs/marc:syspref[@name='OPACResultsMaxItemsUnavailable']+0)"/>
28
    <xsl:variable name="OPACResultsUnavailableGroupingBy" select="marc:sysprefs/marc:syspref[@name='OPACResultsUnavailableGroupingBy']"/>
28
    <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
29
    <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
29
    <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
30
    <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
30
    <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/>
31
    <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/>
Lines 1332-1366 Link Here
1332
                            <status english="Waiting">On hold</status>
1333
                            <status english="Waiting">On hold</status>
1333
                        </xsl:variable>
1334
                        </xsl:variable>
1334
                        <xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')|key('item-by-status', 'other')"/>
1335
                        <xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')|key('item-by-status', 'other')"/>
1335
                        <!-- First group by branch -->
1336
                        <xsl:choose>
1336
                        <xsl:for-each select="items:items/items:item[not(items:resultbranch=preceding-sibling::*/items:resultbranch)]">
1337
                            <xsl:when test="$OPACResultsUnavailableGroupingBy='branch'">
1337
                            <xsl:sort select="items:resultbranch"/>
1338
                                <!-- First group by branch -->
1338
                            <xsl:variable name="currentbranch" select="items:resultbranch"/>
1339
                                <xsl:for-each select="items:items/items:item[not(items:resultbranch=preceding-sibling::*/items:resultbranch)]">
1339
                            <span class="ItemSummary unavailable">
1340
                                    <xsl:sort select="items:resultbranch"/>
1340
                            <!-- Within same branch, group by substatus -->
1341
                                    <xsl:variable name="currentbranch" select="items:resultbranch"/>
1341
                            <xsl:for-each select="$unavailable_items[not(items:substatus=preceding-sibling::*[items:status='reallynotforloan' or items:status='other']/items:substatus)]">
1342
                                    <span class="ItemSummary unavailable">
1342
                                <xsl:sort select="items:substatus"/>
1343
                                    <!-- Within same branch, group by substatus -->
1343
                                <xsl:variable name="current_substatus" select="items:substatus"/>
1344
                                    <xsl:for-each select="$unavailable_items[not(items:substatus=preceding-sibling::*[items:status='reallynotforloan' or items:status='other']/items:substatus)]">
1344
                                    <xsl:call-template name="listCallNumbers">
1345
                                        <xsl:sort select="items:substatus"/>
1345
                                        <xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
1346
                                        <xsl:variable name="current_substatus" select="items:substatus"/>
1346
                                        <xsl:with-param name="max" select="$OPACResultsMaxItemsUnavailable"/>
1347
                                            <xsl:call-template name="listCallNumbers">
1347
                                        <xsl:with-param name="status_text">
1348
                                                <xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
1348
                                            <xsl:value-of select="$currentbranch"/>
1349
                                                <xsl:with-param name="max" select="$OPACResultsMaxItemsUnavailable"/>
1349
                                            <xsl:text>: </xsl:text>
1350
                                                <xsl:with-param name="status_text">
1350
                                            <xsl:if test="items:status='other'">
1351
                                                    <xsl:value-of select="$currentbranch"/>
1351
                                                <xsl:value-of select="exsl:node-set($other_status_list)/status[@english=$current_substatus]"/>
1352
                                                    <xsl:text>: </xsl:text>
1352
                                            </xsl:if>
1353
                                                    <xsl:if test="items:status='other'">
1353
                                            <xsl:if test="items:status='reallynotforloan'">
1354
                                                        <xsl:value-of select="exsl:node-set($other_status_list)/status[@english=$current_substatus]"/>
1354
                                                <xsl:value-of select="$current_substatus"/>
1355
                                                    </xsl:if>
1355
                                            </xsl:if>
1356
                                                    <xsl:if test="items:status='reallynotforloan'">
1356
                                        </xsl:with-param>
1357
                                                        <xsl:value-of select="$current_substatus"/>
1357
                                        <xsl:with-param name="class_block" select="concat('unavailable_',items:substatus)"/>
1358
                                                    </xsl:if>
1358
                                        <xsl:with-param name="class_status" select="'ItemBranch'"/>
1359
                                                </xsl:with-param>
1359
                                        <xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/>
1360
                                                <xsl:with-param name="class_block" select="concat('unavailable_',items:substatus)"/>
1360
                                    </xsl:call-template>
1361
                                                <xsl:with-param name="class_status" select="'ItemBranch'"/>
1361
                            </xsl:for-each>
1362
                                                <xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/>
1362
                            </span>
1363
                                            </xsl:call-template>
1363
                        </xsl:for-each>
1364
                                    </xsl:for-each>
1365
                                    </span>
1366
                                </xsl:for-each>
1367
                            </xsl:when>
1368
                            <xsl:when test="$OPACResultsUnavailableGroupingBy='substatus'">
1369
                            </xsl:when>
1370
                        </xsl:choose>
1364
                    </span></xsl:if>
1371
                    </span></xsl:if>
1365
1372
1366
                </xsl:otherwise>
1373
                </xsl:otherwise>
1367
- 

Return to bug 28831