[% 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 = "hold_history"; parent="holds"; limit = ctx.hold_history_limit; offset = ctx.hold_history_offset; count = ctx.hold_history_ids.size; %]

[% l('Holds History') %]

[% IF offset != 0 %] limit,offset => (offset - limit)}) %]' >◄[% l('Previous') %] [% END %] [% IF offset > 0 || count > limit; curpage = 0; WHILE curpage * limit < count; IF curpage * limit == offset; %] [% curpage + 1 %] [%- ELSE %] limit, offset => (curpage * limit)}) %]' class="np_nav_link classic_link btn btn-action">[% curpage + 1 %] [%- END; curpage = curpage + 1; END; END %] [% IF count > limit + offset %] limit, offset => (offset + limit)}) %]' >[% l('Next') %]►[% END %]

[% 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; %]

[% l('Export List') %]

[% IF ctx.holds.size && 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('Status') %]
Title [% IF attrs.author; %] Author [% END %]
[% IF attrs.format_icon %] [% attrs.format_label | html %] [% END %] [% attrs.format_label | html %]
Format [% attrs.format_label | html %]
Pickup Location [% ctx.get_aou(ahr.pickup_lib).name | html %] Hold Status
[% PROCESS get_hold_status hold=hold; %]
[% END %]
[% END %]