args.uris = [];
# URI info is in volumes/volume/uris/volume, instead of uri element
- i = 0;
FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
- i = i + 1;
# Check volume visibility - could push this into XPath
vol.label = volume.getAttribute('label');
+ vol.id = volume.getAttribute('id');
NEXT IF volume.getAttribute('opac_visible') == 'false';
NEXT IF volume.getAttribute('deleted') == 'true';
IF vol.label == '##URI##';
- FOR uri IN xml.findnodes('//*[local-name()="uris"]/*[local-name()="volume"]', volume);
+ FOR uri IN volume.findnodes('./*[local-name()="uris"]/*[local-name()="volume"]');
res.href = uri.getAttribute('href');
res.link = uri.getAttribute('label');
res.note = uri.getAttribute('use_restriction');
END;
NEXT;
ELSE;
- copies = xml.findnodes('//*[local-name()="copies"]/*[local-name()="copy"]', volume);
+ copies = volume.findnodes('./*[local-name()="copies"]/*[local-name()="copy"]');
FOR copy IN copies;
# Check copy visibility
cp.deleted = copy.getAttribute('deleted');
NEXT IF cp.visible == 'false';
- loc = xml.findnodes('//*[local-name()="location"]', copy);
- circlib = xml.findnodes('//*[local-name()="circlib"]', copy);
- status = xml.findnodes('//*[local-name()="status"]', copy);
+ loc = copy.findnodes('./*[local-name()="location"]');
+ circlib = copy.findnodes('./*[local-name()="circlib"]');
+ status = copy.findnodes('./*[local-name()="status"]');
holding = {
label => vol.label,
- location => loc.0.textContent,
- library => circlib.0.textContent,
- status => status.0.textContent
+ location => loc.textContent,
+ library => circlib.textContent,
+ status => status.textContent
+ barcode => copy.getAttribute('barcode')
};
args.holdings.push(holding);
END;
result_count = ctx.result_start;
%]
+
<div style="height: 10px;"></div>
[% BLOCK results_count_header %]
<div class="results_header_nav1">
[% args.phys_desc %]
</td>
</tr>
-
- [% FOR copy IN args.holdings %]
- <tr name='bib_cn_list' class='result_table_title_cell'>
- <td valign='top'>
- <strong>[% l('Call number:') %]</strong>
- </td>
- <td>[% copy.label _ ' ' _ copy.location _ ' ' _ copy.library _ ' ' _ copy.status %]</td>
- </tr>
- [% END %]
-
[% FOR uri IN args.uris%]
<tr name='bib_uri_list' class='result_table_title_cell'>
<td valign='top'>
<td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
</tr>
[% END %]
-
-
+ [% IF args.holdings.size > 0 %]
+ <tr name='bib_cn_list' class='result_table_title_cell'>
+ <td colspan='2'>
+ <table class='result_holdings_table'>
+ <thead><tr>
+ <th>[% l('Library') %]</th>
+ <th>[% l('Shelving location') %]</th>
+ <th>[% l('Call number') %]</th>
+ <th>[% l('Status') %]</th>
+ </tr></thead>
+ <tbody>
+ [% FOR copy IN args.holdings %]
+ <tr>
+ <td>[% copy.library %]</td>
+ <td>[% copy.location %]</td>
+ <td>[% copy.label %]</td>
+ <td>[% copy.status %]</td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ [% END %]
</table>
<div>
[% l('[_1] of [quant,_2,copy,copies] available',