1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 WRAPPER "opac/parts/myopac/base.tt2";
5 limit = ctx.circ_history_limit;
6 offset = ctx.circ_history_offset;
9 <h3 class="sr-only">[% l('History of Checked Out Items') %]</h3>
10 <div style="padding:0px;">
12 <div id="acct_checked_tabs">
14 <a href='[% mkurl('circs') %]'>[% l("Current Items Checked Out") %]</a>
16 <div class="align selected">
17 <a href="#">[% l("Check Out History") %]</a>
21 <div class="header_middle">
22 <span class="float-left">[% l('Previously Checked Out Items') %]</span>
23 <span class='float-left' style='padding-left: 10px;'>
24 <a href='[% mkurl('circ_history', {limit => limit, offset => (offset - limit)}) %]'
25 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
26 [%# TODO: get total to prevent paging off then end of the list.. %]
27 <a href='[% mkurl('circ_history', {limit => limit, offset => (offset + limit)}) %]'
28 [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
30 <div class="float-left">
31 <form action="[% mkurl(ctx.opac_root _ '/myopac/circ_history/export') %]" method="post">
33 [%- INCLUDE "opac/parts/preserve_params.tt2" %]
34 [% IF ctx.circs.size > 0 %]
35 <input type="hidden" name="filename" value="[% l('circ_history.csv') %]"/>
36 <button type="submit">[% l('Download CSV') %]</button>
42 <div class="clear-both"></div>
44 [% IF ctx.circs.size < 1 %]
45 <div class="warning_box">[% l('There are no items in your circulation history.') %]</div>
48 <div id='checked_main'>
49 <table id="acct_checked_main_header"
50 title="[% l('History of Items Checked Out') %]">
53 <th>[% l('Title / Author') %]</th>
54 <th>[% l('Checkout Date') %]</th>
55 <th>[% l('Due Date') %]</th>
56 <th>[% l('Date Returned') %]</th>
57 <th>[% l('Barcode') %]</th>
58 <th>[% l('Call Number') %]</th>
62 [% FOR circ IN ctx.circs;
63 attrs = {marc_xml => circ.marc_xml};
64 PROCESS get_marc_attrs args=attrs; %]
67 <a href="[% mkurl(ctx.opac_root _ '/record/' _ circ.circ.target_copy.call_number.record.id) %]"
68 [% html_text_attr('title', l('Catalog record [_1]', attrs.title)) %]>
69 [% attrs.title | html %]
71 [% IF attrs.author %] /
72 <a href="[% mkurl(ctx.opac_root _ '/results',
73 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
74 )%]">[% attrs.author | html %]</a>
78 [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
81 [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
85 IF circ.circ.checkin_time;
86 date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT);
88 <span style='color:blue;'>*</span><!-- meh -->
91 <td>[% circ.circ.target_copy.barcode | html %]</td>
92 <td>[% circ.circ.target_copy.call_number.label | html %]</td>