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