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 cp_org_unit = ctx.get_aou(ou_id);
11 IF cp_org_unit.opac_visible == 'f' AND !ctx.is_staff;
15 ou_name = cp_org_unit.name;
16 displayed_ous.$ou_name = 1;
19 [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %]
20 [%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
21 IF ou_avail > 0 && this_depth != ctx.copy_depth %]
22 <a href="[% mkurl('', {copy_depth => this_depth}, ['copy_offset']); %]"
23 title="[% l('Show copies at [_1]', ou_name); %]">
24 [%- l('(Show)'); %]</a>
27 [%- depth = depth + 1;
30 depth = attrs.plib_copy_counts.size - 1;
31 ou_name = ctx.get_aou(attrs.plib_copy_counts.$depth.org_unit).name;
32 ou_id = attrs.plib_copy_counts.$depth.org_unit;
33 UNLESS depth < 0 || displayed_ous.exists(ou_name);
35 [%- IF attrs.plib_copy_counts.$depth.count > 0; %]
36 <li class="preferred">[%
37 l('[_1] of [quant,_2,copy,copies] available at [_3].',
38 attrs.plib_copy_counts.$depth.available,
39 attrs.plib_copy_counts.$depth.count,
41 %] <a href="[% mkurl('', {locg => ou_id}, ['copy_offset']); %]"
42 title="[% l('Show copies at [_1]', ou_name); %]">[%
43 l('(Show preferred library)');