[% PROCESS "opac/parts/header.tt2"; PROCESS "opac/parts/misc_util.tt2"; WRAPPER "opac/parts/myopac/base.tt2"; myopac_page = "circs" %]
[% l('Current Items Checked Out') %]
[% 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 %]
[% l('Renewing Help') %]
[% FOR circ IN ctx.circs; attrs = {marc_xml => circ.marc_xml}; PROCESS get_marc_attrs args=attrs; %] [% due_date = ctx.parse_datetime(circ.circ.due_date); due_class = (date.now > date.format(due_date, '%s')) ? 'error' : ''; %] [% IF circ.renewal_response AND circ.renewal_response.textcode != 'SUCCESS' %] [% END; END %]
[% l('Title / Author') %] [% l('Renewals Left') %] [% l('Due Date') %] [% l('Barcode') %] [% l('Call number') %]
[% IF circ.circ.target_copy.call_number.id == -1 %] [% circ.circ.target_copy.dummy_title | html %] [% ELSIF attrs.title %] [% attrs.title | html %] [% END %] [% IF circ.circ.target_copy.call_number.id == -1 %] / [% circ.circ.target_copy.dummy_author | html %] [% ELSIF attrs.author %] / [% attrs.author | html %] [% END %] [% circ.circ.renewal_remaining %] [% date.format(due_date, DATE_FORMAT) %] [% circ.circ.target_copy.barcode | html %] [% circ.circ.target_copy.call_number.label | html %]
[%# XXX colspan="0" does not work in IE %] [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
[% END %] [% END %]