1 <span id="rdetail_copy_counts">
2 <h2>[% l('Available copies') %]</h2>
4 [%- depths = ctx.copy_summary.size;
8 ou_avail = ctx.copy_summary.$depth.available;
9 ou_id = ctx.copy_summary.$depth.org_unit;
10 ou_name = ctx.get_aou(ou_id).name;
11 displayed_ous.$ou_name = 1;
14 [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %]
15 [%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
16 IF ou_avail > 0 && this_depth != ctx.copy_depth %]
17 <a href="[% mkurl('', {copy_depth => this_depth}, ['copy_offset']); %]"
18 title="[% l('Show copies at [_1]', ou_name); %]">
19 [%- l('(Show)'); %]</a>
22 [%- depth = depth + 1;
25 depth = attrs.plib_copy_counts.size - 1;
26 ou_name = ctx.get_aou(attrs.plib_copy_counts.$depth.org_unit).name;
27 ou_id = attrs.plib_copy_counts.$depth.org_unit;
28 UNLESS depth < 0 || displayed_ous.exists(ou_name);
30 <li class="preferred">[%
31 l('[_1] of [quant,_2,copy,copies] available at [_3].',
32 attrs.plib_copy_counts.$depth.available,
33 attrs.plib_copy_counts.$depth.count,
35 %] <a href="[% mkurl('', {locg => ou_id}, ['copy_offset']); %]"
36 title="[% l('Show copies at [_1]', ou_name); %]">[%
37 l('(Show preferred library)');