[% PROCESS "opac/parts/header.tt2"; PROCESS "opac/parts/misc_util.tt2"; PROCESS "opac/parts/hold_status.tt2"; PROCESS "opac/parts/org_selector.tt2"; PROCESS "opac/parts/metarecord_hold_filters.tt2"; WRAPPER "opac/parts/myopac/base.tt2"; myopac_page = "holds"; # in this case, just for tab coloring. hold = ctx.holds.0; ahr = hold.hold.hold; attrs = {marc_xml => hold.marc_xml}; PROCESS get_marc_attrs args=attrs; hold.human_status = PROCESS get_hold_status hold=hold; # Do this up front to avoid verbosity later expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : ''; thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : ''; %]

[% l('Edit Hold') %]

[% l('Editing Hold') %]         [% l('List all holds') %]
[% IF hold; title = attrs.title; IF ahr.hold_type == 'P'; title = l('[_1] ([_2])', title, hold.hold.part.label); END %]

[% title | html %]

[% attrs.author | html %]

[% IF attrs.format_icon %]

[% l('Format:') %] [% attrs.format_label | html %]

[% END %]

[% l('Status') %]: [% hold.human_status %]

[% IF hold.hold.status < 3 OR hold.hold.status == 7 %] [%# The following actions cannot be performed on holds that have already been captured... %] [% END %]
[% l('Pickup library') %] [% INCLUDE build_org_selector name='pickup_lib' value=ahr.pickup_lib can_have_vols_only=1 hold_pickup_lib=1 %]
[% l('Cancel unless filled by') %] [% l('Enter date in MM/DD/YYYY format') %]
[% l('Active?') %]
[% l('If suspended, activate on') %] [% l('Enter date in MM/DD/YYYY format') %]
[% IF hold.metarecord_filters.formats.size OR (hold.metarecord_filters.langs.size.defined && hold.metarecord_filters.langs.size > 1); PROCESS metarecord_hold_filters_selector hold_data=hold; END %]
[% ELSE; l('Hold not found'); END %]
[% END %]