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

[% l('Holds History') %]

[% IF ebook_api.enabled == 'true' %] [% END %]
[% l("Previously Held Items") %] 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') %]
[% 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') %]
[% IF attrs.format_icon %] [% attrs.format_label | html %] [% END %]
[% ctx.get_aou(ahr.pickup_lib).name | html %]
[% PROCESS get_hold_status hold=hold; %]
[% END %]
[% END %]