[% PROCESS "opac/parts/header.tt2"; PROCESS "opac/parts/misc_util.tt2"; PROCESS "opac/parts/hold_status.tt2"; WRAPPER "opac/parts/myopac/base.tt2"; myopac_page = "holds"; limit = ctx.holds_limit; offset = ctx.holds_offset; count = ctx.holds_ids.size; %]

[% l('My Holds') %]

[% IF CGI.param("available"); l("Items Ready for Pickup"); ELSE; l("Current Items on Hold"); END %] limit,offset => (offset - limit)}) %]' [% IF offset <= 0 %] class='invisible' [% END %]>[% l('Previous') %] [% IF offset > 0 || count > limit; curpage = 0; WHILE curpage * limit < count; IF curpage * limit == offset; %] [% curpage + 1 %] [%- ELSE %] limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %] [%- END; curpage = curpage + 1; END; END %] limit, offset => (offset + limit)}) %]' [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %] [% l('Export List') %]
[% l('Holds Help') %] [% IF ctx.hold_suspend_post_capture; l('One or more holds could not be suspended because the item is at (or en route to) the pickup library.'); END; %] [% IF CGI.param("available") -%] [% l('Show all holds') %] | [% l("Show only available holds") %] [% ELSE -%] [% l("Show all holds") %] | [% l("Show only available holds") %] [% END -%]
[% IF ctx.holds.size < 1 %]
[% l('No holds found.') %]
[% ELSE %] [% FOR hold IN ctx.holds; attrs = {marc_xml => hold.marc_xml}; PROCESS get_marc_attrs args=attrs; ahr = hold.hold.hold %] [% END %]
[% l('Title') %] [% l('Author') %] [% l('Format') %] [% l('Pickup Location') %] [% l('Activate') %] [% l('Cancel if not filled by') %] [% l('Active') %] [% l('Status') %] [% l('Notes') %]
[% title = attrs.title; IF ahr.hold_type == 'P'; title = l('[_1] ([_2])', title, hold.hold.part.label); END; %] [% title | html %]
[% formats = attrs.all_formats.size; IF ahr.hold_type == 'M'; # only show selected formats for metarecords formats = []; FOR ccvm IN hold.metarecord_selected_filters.icons; format = {}; format.icon = PROCESS get_ccvm_icon id=ccvm.id search_label=1; format.label = PROCESS get_ccvm_label id=ccvm.id search_label=1; formats.push(format); END; END; FOR format IN formats %] [% format.label | html %] [% END %]
[% ctx.get_aou(ahr.pickup_lib).name | html %] [% IF ahr.frozen == 't' AND ahr.thaw_date; date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT); END %] [% IF ahr.expire_time; date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT); END %] [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
[% PROCESS get_hold_status hold=hold; %]
[%- FOREACH pubnote IN ahr.notes; IF pubnote.pub == 't'; %]
[% pubnote.title | html %]
[% pubnote.body | html %]
[%- END; END; %]
[% l('Edit') %]
[% END %]
[% END %]