]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
TPac: detail page distinct copy/holdings display depth
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / record / copy_counts.tt2
1 <span id="rdetail_copy_counts">
2     <h2>[% l('Available copies') %]</h2>
3     <ul>
4     [%- depths = ctx.copy_summary.size;
5         depth = 0;
6         WHILE depth < depths;
7             ou_avail = ctx.copy_summary.$depth.available;
8             ou_id = ctx.copy_summary.$depth.org_unit;
9     %]
10     <li>
11     [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ctx.get_aou(ou_id).name) | html %]
12     [%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
13         IF ou_avail > 0 && this_depth != ctx.copy_depth %]
14     <a href="[% mkurl('', {copy_depth => this_depth}, ['copy_offset']); %]"
15        title="[% l('Show copies at [_1]', ctx.get_aou(ou_id).name); %]">
16        [%- l('(Show)'); %]</a>
17     [%- END; %]
18     </li>
19     [%- depth = depth + 1; END %]
20     </ul>
21 </span>