[%- # If being used in serial mode, flatten list of units so that they can be # used like one long list of copies without changing so much code below. IF serial_holdings; copies = []; FOREACH h IN serial_holdings; units = h.units.slice(0); # copy FOREACH unit IN units; unit.holding_label = h.label; END; copies = copies.merge(units); END; END; FOREACH copy_info IN copies; IF copy_info.call_number_label != '##URI##'; has_copies = 'true'; END; IF copy_info.part_label != ''; has_parts = 'true'; END; IF has_parts && has_copies; LAST; END; END; -%] [%- MACRO display_ou_distance(ou) BLOCK; km = ctx.ou_distances.$ou; IF km && km != '-1'; IF ctx.get_org_setting(ctx.physical_loc || ctx.search_ou, 'opac.geographic_proximity_in_miles'); distance = l('[_1] mi', POSIX.sprintf('%.01f', km / 1.609)); ELSE; distance = l('[_1] km', POSIX.sprintf('%.01f', km)); END; ELSE; distance = '-'; END; %] [% distance %] [%- END %] [%- IF has_copies or ctx.foreign_copies; depth = CGI.param('copy_depth').defined ? CGI.param('copy_depth') : CGI.param('depth').defined ? CGI.param('depth') : ctx.copy_summary.last.depth; total_copies = ctx.copy_summary.$depth.count; %] [% IF ctx.geo_sort %]
[% p = 'geographic-location'; IF CGI.params.$p && ctx.has_valid_coords %] [% END %] [% END %][% l("Issue Label") %] | [%- ELSE -%][% l("Location") %] | [%- END %][% l("Call Number / Copy Notes") %] | [%- IF has_parts == 'true' %][% l("Part") %] | [%- END %][% l("Barcode") %] | [% l("Shelving Location") %] | [%- IF ctx.is_staff || ctx.use_courses %][% l("Circulation Modifier") %] | [%- END %] [%- IF ctx.is_staff %][% l("Age Hold Protection") %] | [% l("Active/Create Date") %] | [%- END %] [%- IF ctx.is_staff OR serial_holdings %][% l("Holdable?") %] | [%- END %][% l("Status") %] | [% l("Due Date") %] | [%- IF ctx.use_courses %][% l("Courses") %] | [%- END %] [%- IF ctx.geo_sort && ctx.has_valid_coords %][% l("Distance") %] | [%- END %]|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[%- bib_lib_name = ctx.get_aou(bib.target_copy.circ_lib).name | html;
l("[_1] (foreign item)", bib_lib_name); -%]
|
[% bib.target_copy.call_number.label | html %] | [% bib.target_copy.barcode | html %] | [% bib.target_copy.location.name | html %] | [% bib.target_copy.status.name | html %] | [% date.format(ctx.parse_datetime(copy_info.due_date, copy_info.circ_circ_lib),DATE_FORMAT) %] | [%- IF ctx.geo_sort && ctx.has_valid_coords %][% display_ou_distance(bib.target_copy.circ_lib) %] | [%- END %]||||||||
[%- copy_info.holding_label | html; -%] | [%- ELSE %][%- INCLUDE "opac/parts/library_name_link.tt2"; -%] | [% END %][% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](Text)[% END %] | [%- IF has_parts == 'true' %][% copy_info.part_label | html %] | [%- END %][% copy_info.barcode | html -%] [% IF ctx.is_staff %] [%- IF ctx.is_browser_staff %] [% l('view') %] [% IF ctx.has_perm('UPDATE_COPY', copy_info.circ_lib) OR ctx.has_perm('UPDATE_COPY', copy_info.call_number_owning_lib) %] | [% l('edit') %] [% END %] [% ELSE %] [% l('view') %] [%# if the user can edit copies, show the copy edit link %] [% IF ctx.has_perm('UPDATE_COPY', copy_info.circ_lib) OR ctx.has_perm('UPDATE_COPY', copy_info.call_number_owning_lib) %] | [% l(' edit') %] [% END %] [% END %] [% END %] [%- IF attrs.gtin13; ''; END; -%] | [%- INCLUDE "opac/parts/location_name_link.tt2"; -%] | [% IF copy_info.courses.size > 0 || ctx.is_staff %][% copy_info.circ_modifier | html %] | [% ELSIF ctx.use_courses %][% END %] [% IF ctx.is_staff %] | [% copy_info.age_protect ? ctx.get_crahp(copy_info.age_protect).name : l('None') | html %] | [% IF ctx.get_org_setting(copy_info.circ_lib, 'circ.holds.age_protect.active_date') == 1; disp_date = copy_info.active_date ? copy_info.active_date : copy_info.create_date; ELSE; disp_date = copy_info.create_date; END; IF disp_date; date.format( ctx.parse_datetime(disp_date), DATE_FORMAT ); ELSE; '-'; END; %] | [% END # is_staff %] [% IF ctx.is_staff OR serial_holdings %][% # Show copy/volume hold links to staff (without # checking whether they have permissions to do those). overall_holdable = ( copy_info.holdable == 't' AND copy_info.location_holdable == 't' AND copy_info.status_holdable == 't' ); IF overall_holdable; hold_link = ''; param_sep = l(" / "); # Only staff get to place copy or volume holds IF ctx.is_staff; hold_link = '' _ l('Copy hold') _ ''; IF copy_info.call_number != last_cn; last_cn = copy_info.call_number; hold_link = hold_link _ param_sep; hold_link = hold_link _ '' _ l('Volume hold') _ ''; END; IF serial_holdings; hold_link = hold_link _ param_sep; END; END; IF serial_holdings; hold_link = hold_link _ '' _ l('Issue hold') _ ''; END; hold_link; ELSE; l("Not holdable"); END %] | [%- END %][%- schema_copy_status.${copy_info.status_code}; copy_info.copy_status | html; -%] | [% IF copy_info.due_date; date.format( ctx.parse_datetime(copy_info.due_date, copy_info.circ_circ_lib), DATE_FORMAT ); ELSE; '-'; END %] | [%- IF ctx.use_courses %][%- FOREACH course IN copy_info.courses %]
[% course.course_number %]
[% END %] |
[% END %]
[%- IF ctx.geo_sort && ctx.has_valid_coords %]
[% display_ou_distance(copy_info.circ_lib) %] | [%- END %]
[% note.title | html %]: [% note.value | html %] | ||||||||||||||
[% tag.tag_type.label _ ": " | html %] [% IF tag.url %] [% END %] [% tag.value | html %] [% IF tag.url %] [% END %] | ||||||||||||||
| ||||||||||||||
« [% l('Previous [_1]', ctx.copy_offset - new_offset) %] | [%- END %] [%- IF copies.size >= ctx.copy_limit AND (ctx.copy_offset + ctx.copy_limit < total_copies) %][% l('Next [_1]', ctx.copy_limit) %] » | [%- END %]|||||||||||||