]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/circ_history.tt2
TPAC: Make corner image link to server root
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / circ_history.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     WRAPPER "opac/parts/myopac/base.tt2";
4     myopac_page = "circs"
5     limit = ctx.circ_history_limit;
6     offset = ctx.circ_history_offset;
7 %]
8
9 <div style="padding:0px;">
10     
11     <div id="acct_checked_tabs">
12         <div class="align">
13             <a href='[% mkurl('circs') %]'>[% l("Current Items Checked Out") %]</a>
14         </div>
15         <div class="align selected">
16             <a href="#">[% l("Check Out History") %]</a>
17         </div>
18     </div>
19
20     <div class="header_middle">
21         <span class="float-left">[% l('Previously Checked Out Items') %]</span>
22         <span class='float-left' style='padding-left: 10px;'>
23             <a href='[% mkurl('circ_history', {limit => limit, offset => (offset - limit)}) %]'
24                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
25             [%# TODO: get total to prevent paging off then end of the list.. %]
26             <a href='[% mkurl('circ_history', {limit => limit, offset => (offset + limit)}) %]'
27                [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
28         </span>
29         <span class="float-left">
30             <form action="[% mkurl(ctx.opac_root _ '/myopac/circ_history/export') %]" method="post">
31                 <div>
32                     [%- INCLUDE "opac/parts/preserve_params.tt2" %]
33                     [% IF ctx.circs.size > 0 %]
34                     <input type="hidden" name="filename" value="[% l('circ_history.csv') %]"/> 
35                     <button type="submit">[% l('Download CSV') %]</button>
36                     [% END %]
37                 </div>
38             </form>
39         </span>
40     </div>
41     <div class="clear-both"></div>
42
43     [% IF ctx.circs.size < 1 %]
44     <div class="warning_box">[% l('There are no items in your circulation history.') %]</div>
45     [% ELSE %]
46
47     <div id='checked_main'>
48         <table id="acct_checked_main_header">
49             <thead>
50                 <tr>
51                     <th>[% l('Title / Author') %]</th>
52                     <th>[% l('Checkout Date') %]</th>
53                     <th>[% l('Due Date') %]</th>
54                     <th>[% l('Date Returned') %]</th>
55                     <th>[% l('Barcode') %]</th>
56                     <th>[% l('Call Number') %]</th>
57                 </tr>
58             </thead>
59             <tbody>
60                 [% FOR circ IN ctx.circs;
61                     attrs = {marc_xml => circ.marc_xml};
62                     PROCESS get_marc_attrs args=attrs; %]
63                     <tr>
64                         <td>
65                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ circ.circ.target_copy.call_number.record.id) %]" 
66                                 name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
67                             [% IF attrs.author %] /
68                             <a href="[% mkurl(ctx.opac_root _ '/results',
69                                 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
70                             )%]">[% attrs.author | html %]</a>
71                             [% END %]
72                         </td>
73                         <td>
74                             [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
75                         </td>
76                         <td>
77                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
78                         </td>
79                         <td>
80                             [% 
81                                 IF circ.circ.checkin_time; 
82                                     date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
83                                 ELSE; %]
84                                 <span style='color:blue;'>*</span><!-- meh -->
85                             [% END; %]
86                         </td>
87                         <td>[% circ.circ.target_copy.barcode | html %]</td>
88                         <td>[% circ.circ.target_copy.call_number.label | html %]</td>
89                     </tr>
90                 [% END %]
91             </tbody>
92         </table>
93     </div>
94     [% END %]
95 </div>
96 [% END %]