Lines 9-15
Link Here
|
9 |
<xsl:import href="MARC21slimUtils.xsl"/> |
9 |
<xsl:import href="MARC21slimUtils.xsl"/> |
10 |
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> |
10 |
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> |
11 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
11 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
12 |
<xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
12 |
<xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> |
|
|
13 |
<xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
13 |
|
14 |
|
14 |
<xsl:template match="/"> |
15 |
<xsl:template match="/"> |
15 |
<xsl:apply-templates/> |
16 |
<xsl:apply-templates/> |
Lines 19-24
Link Here
|
19 |
<!-- Option: Display Alternate Graphic Representation (MARC 880) --> |
20 |
<!-- Option: Display Alternate Graphic Representation (MARC 880) --> |
20 |
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> |
21 |
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> |
21 |
|
22 |
|
|
|
23 |
<xsl:variable name="OPACResultsBranchXSLT" select="marc:sysprefs/marc:syspref[@name='OPACResultsBranchXSLT']"/> |
22 |
<xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> |
24 |
<xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> |
23 |
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> |
25 |
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> |
24 |
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> |
26 |
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> |
Lines 1051-1103
Link Here
|
1051 |
<xsl:variable name="available_items" |
1053 |
<xsl:variable name="available_items" |
1052 |
select="key('item-by-status', 'available')"/> |
1054 |
select="key('item-by-status', 'available')"/> |
1053 |
<xsl:choose> |
1055 |
<xsl:choose> |
1054 |
<xsl:when test="$singleBranchMode=1"> |
1056 |
<xsl:when test="$singleBranchMode=1"> |
1055 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1057 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1056 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1058 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1057 |
<xsl:text> (</xsl:text> |
1059 |
<xsl:text> (</xsl:text> |
1058 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1060 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1059 |
<xsl:text>)</xsl:text> |
1061 |
<xsl:text>)</xsl:text> |
1060 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1062 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
|
|
1063 |
</xsl:for-each> |
1064 |
</xsl:when> |
1065 |
<xsl:otherwise> |
1066 |
<xsl:choose> |
1067 |
<xsl:when test="$OPACResultsBranchXSLT='homebranch'"> |
1068 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1069 |
<xsl:value-of select="items:homebranch"/> |
1070 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1071 |
<xsl:text> (</xsl:text> |
1072 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1073 |
<xsl:text>)</xsl:text> |
1074 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1061 |
</xsl:for-each> |
1075 |
</xsl:for-each> |
1062 |
</xsl:when> |
1076 |
</xsl:when> |
1063 |
<xsl:otherwise> |
1077 |
<xsl:when test="$OPACResultsBranchXSLT='holdingbranch'"> |
1064 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1078 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1065 |
<xsl:value-of select="items:homebranch"/> |
1079 |
<xsl:value-of select="items:holdingbranch"/> |
1066 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1080 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1067 |
<xsl:text> (</xsl:text> |
1081 |
<xsl:text> (</xsl:text> |
1068 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1082 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
1069 |
<xsl:text>)</xsl:text> |
1083 |
<xsl:text>)</xsl:text> |
1070 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1084 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1071 |
</xsl:for-each> |
1085 |
</xsl:for-each> |
1072 |
</xsl:otherwise> |
1086 |
</xsl:when> |
|
|
1087 |
</xsl:choose> |
1088 |
</xsl:otherwise> |
1073 |
</xsl:choose> |
1089 |
</xsl:choose> |
1074 |
|
1090 |
|
1075 |
</span> |
1091 |
</span> |
1076 |
</xsl:when> |
1092 |
</xsl:when> |
1077 |
</xsl:choose> |
1093 |
</xsl:choose> |
1078 |
|
1094 |
|
1079 |
<xsl:choose> |
1095 |
<xsl:choose> |
1080 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1096 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1081 |
<span class="available"> |
1097 |
<span class="available"> |
1082 |
<b><xsl:text>Copies available for reference: </xsl:text></b> |
1098 |
<b><xsl:text>Copies available for reference: </xsl:text></b> |
1083 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1099 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1084 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
|
|
1085 |
<xsl:value-of select="items:homebranch"/> |
1086 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1087 |
<xsl:text> (</xsl:text> |
1088 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1089 |
<xsl:text> )</xsl:text> |
1090 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1091 |
</xsl:for-each> |
1092 |
</span> |
1093 |
</xsl:when> |
1094 |
</xsl:choose> |
1095 |
|
1100 |
|
1096 |
<xsl:choose> <xsl:when test="count(key('item-by-status', 'available'))>0"> |
1101 |
<xsl:choose> |
1097 |
<xsl:choose><xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1102 |
<xsl:when test="$OPACResultsBranchXSLT='homebranch'"> |
1098 |
<br/> |
1103 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1099 |
</xsl:when></xsl:choose> |
1104 |
<xsl:value-of select="items:homebranch"/> |
1100 |
</xsl:when> </xsl:choose> |
1105 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
|
|
1106 |
<xsl:text> (</xsl:text> |
1107 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1108 |
<xsl:text>)</xsl:text> |
1109 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1110 |
</xsl:for-each> |
1111 |
</xsl:when> |
1112 |
<xsl:when test="$OPACResultsBranchXSLT='holdingbranch'"> |
1113 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1114 |
<xsl:value-of select="items:holdingbranch"/> |
1115 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1116 |
<xsl:text> (</xsl:text> |
1117 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
1118 |
<xsl:text>)</xsl:text> |
1119 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1120 |
</xsl:for-each> |
1121 |
</xsl:when> |
1122 |
</xsl:choose> |
1123 |
</span> |
1124 |
</xsl:when> |
1125 |
</xsl:choose> |
1101 |
|
1126 |
|
1102 |
<xsl:if test="count(key('item-by-status', 'Checked out'))>0"> |
1127 |
<xsl:if test="count(key('item-by-status', 'Checked out'))>0"> |
1103 |
<span class="unavailable"> |
1128 |
<span class="unavailable"> |
1104 |
- |
|
|