Lines 14-19
Link Here
|
14 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
14 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
15 |
<xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
15 |
<xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
16 |
<xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> |
16 |
<xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> |
|
|
17 |
<xsl:key name="item-by-substatus-and-branch" match="items:item" use="concat(items:substatus, ' ', items:homebranch)"/> |
17 |
|
18 |
|
18 |
<xsl:template match="/"> |
19 |
<xsl:template match="/"> |
19 |
<xsl:apply-templates/> |
20 |
<xsl:apply-templates/> |
Lines 191-198
Link Here
|
191 |
No items available |
192 |
No items available |
192 |
</xsl:when> |
193 |
</xsl:when> |
193 |
<xsl:when test="count(key('item-by-status', 'available'))>0"> |
194 |
<xsl:when test="count(key('item-by-status', 'available'))>0"> |
194 |
<span class="available"> |
195 |
<span class="available reallyavailable"> |
195 |
<strong><xsl:text>Items available for loan: </xsl:text></strong> |
196 |
<span class="AvailabilityLabel"><strong><xsl:text>Items available for loan: </xsl:text></strong></span> |
196 |
<xsl:variable name="available_items" select="key('item-by-status', 'available')"/> |
197 |
<xsl:variable name="available_items" select="key('item-by-status', 'available')"/> |
197 |
<xsl:choose> |
198 |
<xsl:choose> |
198 |
<xsl:when test="$singleBranchMode=1"> |
199 |
<xsl:when test="$singleBranchMode=1"> |
Lines 208-245
Link Here
|
208 |
<xsl:choose> |
209 |
<xsl:choose> |
209 |
<xsl:when test="$OPACResultsLibrary='homebranch'"> |
210 |
<xsl:when test="$OPACResultsLibrary='homebranch'"> |
210 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
211 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
211 |
<xsl:value-of select="items:homebranch"/> |
212 |
<span class="ItemSummary"> |
212 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>] |
213 |
<span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span> |
213 |
</xsl:if> |
214 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> |
214 |
<xsl:text> (</xsl:text> |
215 |
<span class="CallNumberAndLabel"> |
215 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
216 |
<span class="LabelCallNumber">Call number: </span> |
216 |
<xsl:text>)</xsl:text> |
217 |
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span> |
217 |
<xsl:choose> |
218 |
</span> |
218 |
<xsl:when test="position()=last()"> |
219 |
</xsl:if> |
219 |
<xsl:text>. </xsl:text> |
220 |
<xsl:text> (</xsl:text> |
220 |
</xsl:when> |
221 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
221 |
<xsl:otherwise> |
222 |
<xsl:text>)</xsl:text> |
222 |
<xsl:text>, </xsl:text> |
223 |
<xsl:choose> |
223 |
</xsl:otherwise> |
224 |
<xsl:when test="position()=last()"> |
224 |
</xsl:choose> |
225 |
<xsl:text>. </xsl:text> |
|
|
226 |
</xsl:when> |
227 |
<xsl:otherwise> |
228 |
<xsl:text>, </xsl:text> |
229 |
</xsl:otherwise> |
230 |
</xsl:choose> |
231 |
</span> |
225 |
</xsl:for-each> |
232 |
</xsl:for-each> |
226 |
</xsl:when> |
233 |
</xsl:when> |
227 |
<xsl:otherwise> |
234 |
<xsl:otherwise> |
228 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
235 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
229 |
<xsl:value-of select="items:holdingbranch"/> |
236 |
<span class="ItemSummary"> |
230 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>] |
237 |
<span class="ItemBranch"><xsl:value-of select="items:holdingbranch"/> </span> |
231 |
</xsl:if> |
238 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> |
232 |
<xsl:text> (</xsl:text> |
239 |
<span class="CallNumberAndLabel"> |
233 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
240 |
<span class="LabelCallNumber">Call number: </span> |
234 |
<xsl:text>)</xsl:text> |
241 |
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span> |
235 |
<xsl:choose> |
242 |
</span> |
236 |
<xsl:when test="position()=last()"> |
243 |
</xsl:if> |
237 |
<xsl:text>. </xsl:text> |
244 |
<xsl:text> (</xsl:text> |
238 |
</xsl:when> |
245 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
239 |
<xsl:otherwise> |
246 |
<xsl:text>)</xsl:text> |
240 |
<xsl:text>, </xsl:text> |
247 |
<xsl:choose> |
241 |
</xsl:otherwise> |
248 |
<xsl:when test="position()=last()"> |
242 |
</xsl:choose> |
249 |
<xsl:text>. </xsl:text> |
|
|
250 |
</xsl:when> |
251 |
<xsl:otherwise> |
252 |
<xsl:text>, </xsl:text> |
253 |
</xsl:otherwise> |
254 |
</xsl:choose> |
255 |
</span> |
243 |
</xsl:for-each> |
256 |
</xsl:for-each> |
244 |
</xsl:otherwise> |
257 |
</xsl:otherwise> |
245 |
</xsl:choose> |
258 |
</xsl:choose> |
Lines 250-279
Link Here
|
250 |
</xsl:choose> |
263 |
</xsl:choose> |
251 |
<xsl:choose> |
264 |
<xsl:choose> |
252 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
265 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
253 |
<span class="available"> |
266 |
<span class="available reference"> |
254 |
<strong><xsl:text>Items available for reference: </xsl:text></strong> |
267 |
<span class="AvailabilityLabel"><strong><xsl:text>Items available for reference: </xsl:text></strong></span> |
255 |
<xsl:variable name="reference_items" |
268 |
<xsl:variable name="reference_items" |
256 |
select="key('item-by-status', 'reference')"/> |
269 |
select="key('item-by-status', 'reference')"/> |
257 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
270 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]"> |
258 |
<xsl:if test="$singleBranchMode=0"> |
271 |
<span> |
259 |
<xsl:value-of select="items:homebranch"/> |
272 |
<xsl:attribute name="class"> |
260 |
</xsl:if> |
273 |
ItemSummary |
261 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
274 |
<xsl:value-of select="translate(items:substatus,' ','_')"/> |
262 |
<xsl:text> (</xsl:text> |
275 |
</xsl:attribute> |
263 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
276 |
<xsl:if test="$singleBranchMode=0"> |
264 |
<xsl:text>)</xsl:text> |
277 |
<span class="ItemBranch"><xsl:value-of select="items:homebranch"/><xsl:text> </xsl:text></span> |
265 |
<xsl:choose> |
278 |
</xsl:if> |
266 |
<xsl:when test="position()=last()"> |
279 |
<span class='notforloandesc'><xsl:value-of select="items:substatus"/></span> |
267 |
<xsl:text>. </xsl:text> |
280 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> |
268 |
</xsl:when> |
281 |
<span class="CallNumberAndLabel"> |
269 |
<xsl:otherwise> |
282 |
<span class="LabelCallNumber">Call number: </span> |
270 |
<xsl:text>, </xsl:text> |
283 |
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span> |
271 |
</xsl:otherwise> |
284 |
</span> |
272 |
</xsl:choose> |
285 |
</xsl:if> |
|
|
286 |
<xsl:text> (</xsl:text> |
287 |
<xsl:value-of select="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch)))"/> |
288 |
<xsl:text>)</xsl:text> |
289 |
<xsl:choose> |
290 |
<xsl:when test="position()=last()"> |
291 |
<xsl:text>. </xsl:text> |
292 |
</xsl:when> |
293 |
<xsl:otherwise> |
294 |
<xsl:text>, </xsl:text> |
295 |
</xsl:otherwise> |
296 |
</xsl:choose> |
297 |
</span> |
273 |
</xsl:for-each> |
298 |
</xsl:for-each> |
274 |
</span> |
299 |
</span> |
275 |
</xsl:when> |
300 |
</xsl:when> |
276 |
</xsl:choose> |
301 |
</xsl:choose> |
|
|
302 |
<xsl:if test="count(key('item-by-status', 'available'))=0"> |
303 |
<span class="available"><xsl:value-of select="items:homebranch"/><xsl:text>: </xsl:text></span> |
304 |
</xsl:if> |
305 |
|
306 |
<xsl:choose> |
307 |
<xsl:when test="count(key('item-by-status', 'reallynotforloan'))>0"> |
308 |
<span class="unavailable"> |
309 |
<br /> |
310 |
<xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')"/> |
311 |
<xsl:for-each select="$unavailable_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]"> |
312 |
<span> |
313 |
<xsl:attribute name="class"> |
314 |
ItemSummary |
315 |
<xsl:value-of select="translate(items:substatus,' ','_')"/> |
316 |
</xsl:attribute> |
317 |
<xsl:if test="$singleBranchMode=0"> |
318 |
<span class="ItemBranch"><xsl:value-of select="items:homebranch"/><xsl:text> </xsl:text></span> |
319 |
</xsl:if> |
320 |
<span class='notforloandesc'><xsl:value-of select="items:substatus"/></span> |
321 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> |
322 |
<span class="CallNumberAndLabel"> |
323 |
<span class="LabelCallNumber">Call number: </span> |
324 |
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span> |
325 |
</span> |
326 |
</xsl:if> |
327 |
<xsl:text> (</xsl:text> |
328 |
<xsl:value-of select="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch)))"/> |
329 |
<xsl:text>)</xsl:text> |
330 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
331 |
</span> |
332 |
</xsl:for-each> |
333 |
</span> |
334 |
</xsl:when> |
335 |
</xsl:choose> |
336 |
|
277 |
<xsl:if test="count(key('item-by-status', 'Checked out'))>0"> |
337 |
<xsl:if test="count(key('item-by-status', 'Checked out'))>0"> |
278 |
<span class="unavailable"> |
338 |
<span class="unavailable"> |
279 |
<xsl:text>Checked out (</xsl:text> |
339 |
<xsl:text>Checked out (</xsl:text> |
280 |
- |
|
|