2 FOREACH copy_info IN ctx.copies;
3 IF copy_info.part_label != '';
9 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
12 <th id='copy_header_library'>[% l("Location") %]</th>
13 <th id='copy_header_callnmber'>[% l("Call Number") %]</th>
14 [%- IF has_parts == 'true' %]
15 <th id='copy_header_part'>[% l("Part") %]</th>
17 <th id='copy_header_barcode'>[% l("Barcode") %]</th>
18 <th id='copy_header_shelfloc'>[% l("Shelving Location") %]</th>
19 [%- IF ctx.is_staff %]
20 <th id='copy_header_age_hold'>[% l("Age Hold Protection") %]</th>
21 <th id='copy_header_create_date'>[% l("Create Date") %]</th>
22 <th id='copy_header_holdable'>[% l("Holdable?") %]</th>
24 <th id='copy_header_status'>[% l("Status") %]</th>
25 <th id='copy_header_due_date'>[% l("Due Date") %]</th>
28 <tbody class="copy_details_table">
30 FOR copy_info IN ctx.copies;
31 callnum = copy_info.call_number_label;
32 NEXT IF callnum == '##URI##';
34 callnum_prefix = copy_info.call_number_prefix_label;
35 IF callnum_prefix != "";
36 callnum = callnum_prefix _ " " _ callnum;
39 callnum_suffix = copy_info.call_number_suffix_label;
40 IF callnum_suffix != "";
41 callnum = callnum _ " " _ callnum_suffix;
45 <td header='copy_header_library'>
47 org_name = ctx.get_aou(copy_info.circ_lib).name;
51 <td header='copy_header_callnumber'>[% callnum | html %]</td>
52 [%- IF has_parts == 'true' %]
53 <td header='copy_header_part'>[% copy_info.part_label | html %]</td>
55 <td header='copy_header_barcode'>[% copy_info.barcode | html %]</td>
56 <td header='copy_header_shelfloc'>[% copy_info.copy_location | html %]</td>
57 [%- IF ctx.is_staff %]
58 <td header='copy_header_age_hold'>
59 [% copy_info.age_protect ?
60 ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
62 <td header='copy_header_date_format'>[% date.format(
63 ctx.parse_datetime(copy_info.create_date),
66 <td header='copy_header_holdable'>[% # Show copy/volume hold links to staff (without
67 # checking whether they have permissions to do those).
68 overall_holdable = (copy_info.holdable == 't' AND
69 copy_info.location_holdable == 't' AND
70 copy_info.status_holdable == 't');
73 <a href="[% mkurl(ctx.opac_root _ '/place_hold',
74 {hold_target => copy_info.id, hold_type => 'C', hold_source_page => mkurl()}) %]">[% l("copy") %]</a>
75 [%- IF copy_info.call_number != last_cn;
76 last_cn = copy_info.call_number;
78 <a href="[% mkurl(ctx.opac_root _ '/place_hold',
79 {hold_target => copy_info.call_number, hold_type => 'V', hold_source_page => mkurl()}) %]">[% l("volume") %]</a>
85 <td header='copy_header_status'>[% copy_info.copy_status | html %]</td>
86 <td header='due_date'>[%
87 IF copy_info.due_date;
89 ctx.parse_datetime(copy_info.due_date),
98 [%- IF ctx.copy_offset > 0;
99 new_offset = ctx.copy_offset - ctx.copy_limit;
100 IF new_offset < 0; new_offset = 0; END %]
102 <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">« [%
103 l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
106 [%- IF ctx.copies.size >= ctx.copy_limit %]
108 <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
109 l('Next [_1]', ctx.copy_limit) %] »</a>
115 [%- more_copies_limit = 50 %] [%# TODO: config %]
116 [%- IF ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
117 <div class="rdetail_show_copies">
118 <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
119 <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
121 [%- ELSIF ctx.copy_limit == more_copies_limit %]
122 <div class="rdetail_show_copies">
123 <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
124 <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>