[% PROCESS "opac/parts/header.tt2"; PROCESS "opac/parts/misc_util.tt2"; WRAPPER "opac/parts/myopac/base.tt2"; myopac_page = "circs" limit = ctx.circ_history_limit; offset = ctx.circ_history_offset; %]

[% l('History of Checked Out Items') %]

[% l('Previously Checked Out Items') %] limit, offset => (offset - limit)}) %]' [% IF offset == 0 %] class='invisible' [% END %]>[% l('Previous') %] [%# TODO: get total to prevent paging off then end of the list.. %] limit, offset => (offset + limit)}) %]' [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]
[%- INCLUDE "opac/parts/preserve_params.tt2" %] [% IF ctx.circs.size > 0 %] [% END %]
[% IF ctx.circs.size < 1 %]
[% l('There are no items in your circulation history.') %]
[% ELSE %]
[% FOR circ IN ctx.circs; attrs = {marc_xml => circ.marc_xml}; PROCESS get_marc_attrs args=attrs; %] [% END %]
[% l('Title / Author') %] [% l('Checkout Date') %] [% l('Due Date') %] [% l('Date Returned') %] [% l('Barcode') %] [% l('Call Number') %]
[% attrs.title | html %] [% IF attrs.author %] / [% attrs.author | html %] [% END %] [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %] [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %] [% IF circ.circ.checkin_time; date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); ELSE; %] * [% END; %] [% circ.circ.target_copy.barcode | html %] [% circ.circ.target_copy.call_number.label | html %]
[% END %]
[% END %]