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