Lines 10-16
Link Here
|
10 |
<xsl:import href="MARC21slimUtils.xsl"/> |
10 |
<xsl:import href="MARC21slimUtils.xsl"/> |
11 |
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> |
11 |
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> |
12 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
12 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
13 |
<xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
13 |
<xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
|
|
14 |
<xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> |
14 |
|
15 |
|
15 |
<xsl:template match="/"> |
16 |
<xsl:template match="/"> |
16 |
<xsl:apply-templates/> |
17 |
<xsl:apply-templates/> |
Lines 20-25
Link Here
|
20 |
<!-- Option: Display Alternate Graphic Representation (MARC 880) --> |
21 |
<!-- Option: Display Alternate Graphic Representation (MARC 880) --> |
21 |
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> |
22 |
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> |
22 |
|
23 |
|
|
|
24 |
<xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/> |
23 |
<xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> |
25 |
<xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> |
24 |
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> |
26 |
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> |
25 |
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> |
27 |
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> |
Lines 1166-1200
Link Here
|
1166 |
<xsl:variable name="available_items" |
1168 |
<xsl:variable name="available_items" |
1167 |
select="key('item-by-status', 'available')"/> |
1169 |
select="key('item-by-status', 'available')"/> |
1168 |
<xsl:choose> |
1170 |
<xsl:choose> |
1169 |
<xsl:when test="$singleBranchMode=1"> |
1171 |
<xsl:when test="$singleBranchMode=1"> |
1170 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1172 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1171 |
<span class="ItemSummary"> |
1173 |
<span class="ItemSummary"> |
1172 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1174 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1173 |
<xsl:text> (</xsl:text> |
1175 |
<xsl:text> (</xsl:text> |
1174 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1176 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1175 |
<xsl:text>)</xsl:text> |
1177 |
<xsl:text>)</xsl:text> |
1176 |
<xsl:choose> |
1178 |
<xsl:choose> |
1177 |
<xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when> |
1179 |
<xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when> |
1178 |
<xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise> |
1180 |
<xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise> |
1179 |
</xsl:choose> |
1181 |
</xsl:choose> |
1180 |
</span> |
1182 |
</span> |
1181 |
</xsl:for-each> |
1183 |
</xsl:for-each> |
1182 |
</xsl:when> |
1184 |
</xsl:when> |
1183 |
<xsl:otherwise> |
1185 |
<xsl:otherwise> |
1184 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1186 |
<xsl:choose> |
1185 |
<span class="ItemSummary"> |
1187 |
<xsl:when test="$OPACResultsLibrary='homebranch'"> |
1186 |
<xsl:value-of select="items:homebranch"/> |
1188 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1187 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1189 |
<span class="ItemSummary"> |
1188 |
<xsl:text> (</xsl:text> |
1190 |
<xsl:value-of select="items:homebranch"/> |
1189 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1191 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1190 |
<xsl:text>)</xsl:text> |
1192 |
<xsl:text> (</xsl:text> |
1191 |
<xsl:choose> |
1193 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1192 |
<xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when> |
1194 |
<xsl:text>)</xsl:text> |
1193 |
<xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise> |
1195 |
<xsl:choose> |
1194 |
</xsl:choose> |
1196 |
<xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when> |
1195 |
</span> |
1197 |
<xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise> |
1196 |
</xsl:for-each> |
1198 |
</xsl:choose> |
1197 |
</xsl:otherwise> |
1199 |
</span> |
|
|
1200 |
</xsl:for-each> |
1201 |
</xsl:when> |
1202 |
<xsl:otherwise> |
1203 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1204 |
<span class="ItemSummary"> |
1205 |
<xsl:value-of select="items:holdingbranch"/> |
1206 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1207 |
<xsl:text> (</xsl:text> |
1208 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
1209 |
<xsl:text>)</xsl:text> |
1210 |
<xsl:choose> |
1211 |
<xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when> |
1212 |
<xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise> |
1213 |
</xsl:choose> |
1214 |
</span> |
1215 |
</xsl:for-each> |
1216 |
</xsl:otherwise> |
1217 |
</xsl:choose> |
1218 |
</xsl:otherwise> |
1198 |
</xsl:choose> |
1219 |
</xsl:choose> |
1199 |
|
1220 |
|
1200 |
</span> |
1221 |
</span> |
Lines 1206-1219
Link Here
|
1206 |
<span class="available"> |
1227 |
<span class="available"> |
1207 |
<b><xsl:text>Items available for reference: </xsl:text></b> |
1228 |
<b><xsl:text>Items available for reference: </xsl:text></b> |
1208 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1229 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1209 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1230 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1210 |
<span class="ItemSummary"> |
1231 |
<span class="ItemSummary"> |
1211 |
<xsl:if test="$singleBranchMode=0"> |
1232 |
<xsl:if test="$singleBranchMode=0"> |
1212 |
<xsl:value-of select="items:homebranch"/> |
1233 |
<xsl:value-of select="items:homebranch"/> |
1213 |
</xsl:if> |
1234 |
</xsl:if> |
1214 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1235 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1215 |
<xsl:text> (</xsl:text> |
1236 |
<xsl:text> (</xsl:text> |
1216 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1237 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1217 |
<xsl:text>)</xsl:text> |
1238 |
<xsl:text>)</xsl:text> |
1218 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1239 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1219 |
</span> |
1240 |
</span> |
Lines 1280-1286
Link Here
|
1280 |
<xsl:when test="count(key('item-by-status', 'available'))>0"> |
1301 |
<xsl:when test="count(key('item-by-status', 'available'))>0"> |
1281 |
<span class="available"> |
1302 |
<span class="available"> |
1282 |
<xsl:variable name="available_items" select="key('item-by-status', 'available')"/> |
1303 |
<xsl:variable name="available_items" select="key('item-by-status', 'available')"/> |
1283 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1304 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1284 |
<xsl:choose> |
1305 |
<xsl:choose> |
1285 |
<xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when> |
1306 |
<xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when> |
1286 |
<xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when> |
1307 |
<xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when> |
Lines 1293-1299
Link Here
|
1293 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1314 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1294 |
<span class="available"> |
1315 |
<span class="available"> |
1295 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1316 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1296 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1317 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1297 |
<xsl:choose> |
1318 |
<xsl:choose> |
1298 |
<xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when> |
1319 |
<xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when> |
1299 |
<xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when> |
1320 |
<xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when> |