]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/myopac/circ_history.tt2
More my-account cleanup/consistency
[working/Evergreen.git] / Open-ILS / web / templates / default / opac / myopac / circ_history.tt2
1 [%  PROCESS "default/opac/parts/header.tt2";
2     PROCESS "default/opac/parts/marc_misc.tt2";
3     WRAPPER "default/opac/parts/myopac/base.tt2";
4     myopac_page = "circs";
5     limit = CGI.param('limit') || 25;
6     offset = CGI.param('offset') || 0;
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('Current Items Checked Out') %]</span>
23         <span class='float-left' style='padding-left: 10px;'>
24             [% IF offset > 0 %]
25             <a href='circ_history?limit=[% limit %]&offset=[% offset - 1 %]'>[% l('Previous') %]</a>
26             [% END %]
27             [% IF ctx.circs.size == limit %]
28             [%# TODO: get total to prevent paging off then end of the list.. %]
29             <a href='circ_history?limit=[% limit %]&offset=[% offset + 1 %]'>[% l('Next') %]</a>
30             [% END %]
31         </span>
32         <span class="float-right">
33             <a class="hide_me" href="#">[% l('Export List') %]</a>
34         </span>
35     </div>
36     <div class="clear-both"></div>
37
38     [% IF ctx.circs.size < 1 %]
39     <div class="opac-auto-079">
40         <big><strong>[% l('You have no items checked out.') %]</strong></big>
41     </div>
42     [% ELSE %]
43
44     [% IF ctx.success_renewals %]
45     <div class="renew-summary">
46         [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
47     </div>
48     [% END %]
49
50     [% IF ctx.failed_renewals %]
51     <div class="renew-summary red">
52         [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
53     </div>
54     [% END %]
55
56     <div id='checked_main'>
57         <table style='border-collapse:collapse;'>
58             <thead id="acct_checked_main_header">
59                 <tr>
60                     <td width="32%" style="padding-left:5px;">
61                         <span title="Click to sort" class='pointer'>[% l('Title') %]</span> /
62                         <span title="Click to sort" class='pointer'>[% l('Author') %]</span>
63                     </td>
64                     <td width="10%" style="padding-left:5px;">
65                         <span title="Click to sort" class='pointer'>[% l('Checkout Date') %]</span>
66                     </td>
67                     <td width="10%" style="padding-left:5px;">
68                         <span title="Click to sort" class='pointer'>[% l('Due Date') %]</span>
69                     </td>
70                     <td width="10%" style="padding-left:5px;">
71                         <span title="Click to sort" class='pointer'>[% l('Date Returned') %]</span>
72                     </td>
73                     <td width="16%">
74                         <span title="Click to sort" class='pointer'>[% l('Barcode') %]</span>
75                     </td>
76                     <td width="22%">
77                         <span title="Click to sort" class='pointer'>[% l('Call Number') %]</span>
78                     </td>
79                 </tr>
80             </thead>
81             <tbody>
82                 [% FOR circ IN ctx.circs;
83                     attrs = {marc_xml => circ.marc_xml};
84                     PROCESS get_marc_attrs args=attrs; %]
85                     <tr>
86                         <td style="padding-left:5px;padding-bottom:10px;">
87                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
88                                 name="[% l('Catalog record') %]">[% attrs.title %]</a>
89                             [% IF attrs.author %] /
90                             <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
91                             [% END %]
92                         </td>
93                         <td style="padding-left:5px;">
94                             [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
95                         </td>
96                         <td style="padding-left:5px;">
97                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
98                         </td>
99                         <td style="padding-left:5px;">
100                             [% IF circ.circ.checkin_time; 
101                                 date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
102                             END; %]
103                         </td>
104                         <td>[% circ.circ.target_copy.barcode %]</td>
105                         <td>[% circ.circ.target_copy.call_number.label %]</td>
106                     </tr>
107                 [% END %]
108             </tbody>
109         </table>
110     </div>
111     [% END %]
112 </div>
113 [% END %]