|
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 1331-1365
Link Here
|
| 1331 |
<status english="Waiting">On hold</status> |
1332 |
<status english="Waiting">On hold</status> |
| 1332 |
</xsl:variable> |
1333 |
</xsl:variable> |
| 1333 |
<xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')|key('item-by-status', 'other')"/> |
1334 |
<xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')|key('item-by-status', 'other')"/> |
| 1334 |
<!-- First group by branch --> |
1335 |
<xsl:choose> |
| 1335 |
<xsl:for-each select="items:items/items:item[not(items:resultbranch=preceding-sibling::*/items:resultbranch)]"> |
1336 |
<xsl:when test="$OPACResultsUnavailableGroupingBy='branch'"> |
| 1336 |
<xsl:sort select="items:resultbranch"/> |
1337 |
<!-- First group by branch --> |
| 1337 |
<xsl:variable name="currentbranch" select="items:resultbranch"/> |
1338 |
<xsl:for-each select="items:items/items:item[not(items:resultbranch=preceding-sibling::*/items:resultbranch)]"> |
| 1338 |
<span class="ItemSummary unavailable"> |
1339 |
<xsl:sort select="items:resultbranch"/> |
| 1339 |
<!-- Within same branch, group by substatus --> |
1340 |
<xsl:variable name="currentbranch" select="items:resultbranch"/> |
| 1340 |
<xsl:for-each select="$unavailable_items[not(items:substatus=preceding-sibling::*[items:status='reallynotforloan' or items:status='other']/items:substatus)]"> |
1341 |
<span class="ItemSummary unavailable"> |
| 1341 |
<xsl:sort select="items:substatus"/> |
1342 |
<!-- Within same branch, group by substatus --> |
| 1342 |
<xsl:variable name="current_substatus" select="items:substatus"/> |
1343 |
<xsl:for-each select="$unavailable_items[not(items:substatus=preceding-sibling::*[items:status='reallynotforloan' or items:status='other']/items:substatus)]"> |
| 1343 |
<xsl:call-template name="listCallNumbers"> |
1344 |
<xsl:sort select="items:substatus"/> |
| 1344 |
<xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/> |
1345 |
<xsl:variable name="current_substatus" select="items:substatus"/> |
| 1345 |
<xsl:with-param name="max" select="$OPACResultsMaxItemsUnavailable"/> |
1346 |
<xsl:call-template name="listCallNumbers"> |
| 1346 |
<xsl:with-param name="status_text"> |
1347 |
<xsl:with-param name="items" select="$unavailable_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/> |
| 1347 |
<xsl:value-of select="$currentbranch"/> |
1348 |
<xsl:with-param name="max" select="$OPACResultsMaxItemsUnavailable"/> |
| 1348 |
<xsl:text>: </xsl:text> |
1349 |
<xsl:with-param name="status_text"> |
| 1349 |
<xsl:if test="items:status='other'"> |
1350 |
<xsl:value-of select="$currentbranch"/> |
| 1350 |
<xsl:value-of select="exsl:node-set($other_status_list)/status[@english=$current_substatus]"/> |
1351 |
<xsl:text>: </xsl:text> |
| 1351 |
</xsl:if> |
1352 |
<xsl:if test="items:status='other'"> |
| 1352 |
<xsl:if test="items:status='reallynotforloan'"> |
1353 |
<xsl:value-of select="exsl:node-set($other_status_list)/status[@english=$current_substatus]"/> |
| 1353 |
<xsl:value-of select="$current_substatus"/> |
1354 |
</xsl:if> |
| 1354 |
</xsl:if> |
1355 |
<xsl:if test="items:status='reallynotforloan'"> |
| 1355 |
</xsl:with-param> |
1356 |
<xsl:value-of select="$current_substatus"/> |
| 1356 |
<xsl:with-param name="class_block" select="concat('unavailable_',items:substatus)"/> |
1357 |
</xsl:if> |
| 1357 |
<xsl:with-param name="class_status" select="ItemBranch"/> |
1358 |
</xsl:with-param> |
| 1358 |
<xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/> |
1359 |
<xsl:with-param name="class_block" select="concat('unavailable_',items:substatus)"/> |
| 1359 |
</xsl:call-template> |
1360 |
<xsl:with-param name="class_status" select="ItemBranch"/> |
| 1360 |
</xsl:for-each> |
1361 |
<xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/> |
| 1361 |
</span> |
1362 |
</xsl:call-template> |
| 1362 |
</xsl:for-each> |
1363 |
</xsl:for-each> |
|
|
1364 |
</span> |
| 1365 |
</xsl:for-each> |
| 1366 |
</xsl:when> |
| 1367 |
<xsl:when test="$OPACResultsUnavailableGroupingBy='substatus'"> |
| 1368 |
</xsl:when> |
| 1369 |
</xsl:choose> |
| 1363 |
</span></xsl:if> |
1370 |
</span></xsl:if> |
| 1364 |
|
1371 |
|
| 1365 |
</xsl:otherwise> |
1372 |
</xsl:otherwise> |
| 1366 |
- |
|
|