[% PROCESS "default/opac/parts/header.tt2"; PROCESS "default/opac/parts/marc_misc.tt2"; WRAPPER "default/opac/parts/myopac/base.tt2"; myopac_page = "circs"; limit = CGI.param('limit') || 25; offset = CGI.param('offset') || 0; %]
[% l('Current Items Checked Out') %] [% IF offset > 0 %] [% l('Previous') %] [% END %] [% IF ctx.circs.size == limit %] [%# TODO: get total to prevent paging off then end of the list.. %] [% l('Next') %] [% END %] [% l('Export List') %]
[% IF ctx.circs.size < 1 %]
[% l('You have no items checked out.') %]
[% ELSE %] [% IF ctx.success_renewals %]
[% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
[% END %] [% IF ctx.failed_renewals %]
[% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
[% END %]
[% FOR circ IN ctx.circs; attrs = {marc_xml => circ.marc_xml}; PROCESS get_marc_attrs args=attrs; %] [% END %]
[% l('Title') %] / [% l('Author') %] [% l('Checkout Date') %] [% l('Due Date') %] [% l('Date Returned') %] [% l('Barcode') %] [% l('Call Number') %]
[% attrs.title %] [% IF attrs.author %] / [% attrs.author %] [% 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); END; %] [% circ.circ.target_copy.barcode %] [% circ.circ.target_copy.call_number.label %]
[% END %]
[% END %]