Merge remote branch 'working/user/rri/ttopac' into template-toolkit-opac-master-merge
[Evergreen.git] / Open-ILS / src / templates / default / opac / myopac / circ_history.tt2
1 [%  PROCESS "default/opac/parts/header.tt2";
2     PROCESS "default/opac/parts/misc_util.tt2";
3     WRAPPER "default/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" style="padding-bottom: 12px;color:#666;">
12         <div class="align selected">
13             <a href='circs'><img src="[% ctx.media_prefix %]/images/sub_checked_out_off.jpg"/></a>
14         </div>
15         <div class="align">
16             <img src="[% ctx.media_prefix %]/images/sub_checked_hist_on.jpg"/>
17         </div>
18         <div class="clear-both"></div>
19     </div>
20
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='circ_history?limit=[% limit %]&amp;offset=[% offset - limit %]'
25                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
26             [%# TODO: get total to prevent paging off then end of the list.. %]
27             <a href='circ_history?limit=[% limit %]&amp;offset=[% offset + limit %]'
28                [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
29         </span>
30         <span class="float-right">
31             <a class="hide_me" href="#">[% l('Export List') %]</a>
32         </span>
33     </div>
34     <div class="clear-both"></div>
35
36     [% IF ctx.circs.size < 1 %]
37     <div class="warning_box">
38         <big><strong>[% l('There are no items in your circulation history.') %]</strong></big>
39     </div>
40     [% ELSE %]
41
42     <div id='checked_main'>
43         <table style='border-collapse:collapse;'>
44             <thead id="acct_checked_main_header">
45                 <tr>
46                     <td width="32%" style="padding-left:5px;">
47                         <span title="Click to sort" class='pointer'>[% l('Title') %]</span> /
48                         <span title="Click to sort" class='pointer'>[% l('Author') %]</span>
49                     </td>
50                     <td width="10%" style="padding-left:5px;">
51                         <span title="Click to sort" class='pointer'>[% l('Checkout Date') %]</span>
52                     </td>
53                     <td width="10%" style="padding-left:5px;">
54                         <span title="Click to sort" class='pointer'>[% l('Due Date') %]</span>
55                     </td>
56                     <td width="10%" style="padding-left:5px;">
57                         <span title="Click to sort" class='pointer'>[% l('Date Returned') %]</span>
58                     </td>
59                     <td width="16%">
60                         <span title="Click to sort" class='pointer'>[% l('Barcode') %]</span>
61                     </td>
62                     <td width="22%">
63                         <span title="Click to sort" class='pointer'>[% l('Call Number') %]</span>
64                     </td>
65                 </tr>
66             </thead>
67             <tbody>
68                 [% FOR circ IN ctx.circs;
69                     attrs = {marc_xml => circ.marc_xml};
70                     PROCESS get_marc_attrs args=attrs; %]
71                     <tr>
72                         <td style="padding-left:5px;padding-bottom:10px;">
73                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
74                                 name="[% l('Catalog record') %]">[% attrs.title %]</a>
75                             [% IF attrs.author %] /
76                             <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
77                             [% END %]
78                         </td>
79                         <td style="padding-left:5px;">
80                             [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
81                         </td>
82                         <td style="padding-left:5px;">
83                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
84                         </td>
85                         <td style="padding-left:5px;">
86                             [% 
87                                 IF circ.circ.checkin_time; 
88                                     date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
89                                 ELSE; %]
90                                 <span style='color:blue;'>*</span><!-- meh -->
91                             [% END; %]
92                         </td>
93                         <td>[% circ.circ.target_copy.barcode %]</td>
94                         <td>[% circ.circ.target_copy.call_number.label %]</td>
95                     </tr>
96                 [% END %]
97             </tbody>
98         </table>
99     </div>
100     [% END %]
101 </div>
102 [% END %]