b4f0ea2b755d779826c9b071d91e492bcd3c088c
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / circs.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 <div id='myopac_checked_div'>
6
7     <div id="acct_checked_tabs">
8         <div class="align selected">
9             <a href="#">[% l("Current Items Checked Out") %]</a>
10         </div>
11         <div class="align">
12             <a href="[% mkurl('circ_history') %]">[% l("Check Out History") %]</a>
13         </div>
14     </div>
15
16     <div class="header_middle">
17         <span class="float-left">[% l('Current Items Checked Out') %]</span>
18     </div>
19     <div class="clear-both"></div>
20     [% IF ctx.circs.size < 1 %]
21     <div class="warning_box">[% l('You have no items checked out.') %]</div>
22     [% ELSE %]
23     [% IF ctx.success_renewals %]
24     <div class="renew-summary">
25         [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
26     </div>
27     [% END %]
28     [% IF ctx.failed_renewals %]
29     <div class="renew-summary alert">
30         [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
31     </div>
32     [% END %]
33     <div id='checked_main'>
34         <form method="post" id="circ-form"
35             onsubmit="return confirm('[% l("Are you sure you wish to renew the selected item(s)?") %]');">
36         <table cellpadding='0' cellspacing='0' class="item_list_padding">
37             <tr>
38                 <td>
39                     <select name="action">
40                         <option value="renew">[% l('Renew Selected Titles') %]</option>
41                     </select>
42                 </td>
43                 <td style="padding-left:9px;">
44                     <input type="submit"
45                         value="[% l('Go') %]"
46                         alt="[% l('Go') %]" title="[% l('Go') %]"
47                         class="opac-button" />
48                 </td>
49                 <td style="padding-left:5px;">
50                     <a href="#"><img alt="[% l('Renewing Help') %]"
51                         src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
52                 </td>
53             </tr>
54         </table>
55         <table id="acct_checked_main_header" cellpadding='0' cellspacing='0' border='0'>
56             <thead>
57             <tr>
58                 <th class="checkbox_column">
59                     <input type="checkbox" id="check_all_checked"
60                         onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ' && !inputs[i].disabled) inputs[i].checked = this.checked;}"
61                     />
62                 </th>
63                 <th>[% l('Title / Author') %]</th>
64                 <th>[% l('Renewals Left') %]</th>
65                 <th>[% l('Due Date') %]</th>
66                 <th>[% l('Barcode') %]</th>
67                 <th>[% l('Call number') %]</th>
68             </tr>
69             </thead>
70             <tbody>
71                     [% FOR circ IN ctx.circs;
72                         attrs = {marc_xml => circ.marc_xml};
73                         PROCESS get_marc_attrs args=attrs; %]
74                     <tr>
75                         <td class="checkbox_column" valign="top">
76                             <input type="checkbox" name="circ"
77                                 [% IF circ.circ.renewal_remaining < 1 %] disabled="disabled" [% END %]
78                                 value="[% circ.circ.id %]" />
79                         </td>
80                         <td name="author">
81                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ 
82                                 circ.circ.target_copy.call_number.record.id) %]"
83                                 name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
84                             [% IF attrs.author %] /
85                             <a href="[% mkurl(ctx.opac_root _ '/results',
86                                 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
87                             ) %]">[% attrs.author | html %]</a>
88                             [% END %]
89                         </td>
90                         <td name="renewals" align="center">
91                             [% circ.circ.renewal_remaining %]
92                         </td>
93                         [%
94                             due_date = ctx.parse_datetime(circ.circ.due_date);
95                             due_class = (date.now > date.format(due_date, '%s')) ? 'error' : '';
96                         %]
97                         <td name="due_date" class='[% due_class %]'>
98                             [% date.format(due_date, DATE_FORMAT) %]
99                         </td>
100                         <td name="barcode">
101                             [% circ.circ.target_copy.barcode | html %]
102                         </td>
103                         <td name="call_number">
104                             [% circ.circ.target_copy.call_number.label | html %]
105                         </td>
106                     </tr>
107                     [%  IF circ.renewal_response AND
108                             circ.renewal_response.textcode != 'SUCCESS' %]
109                     <tr>
110                         <td colspan="6">[%# XXX colspan="0" does not work in IE %]
111                             <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.payload.fail_part | html %]">
112                                 [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
113                             </span>
114                         </td>
115                     </tr>
116                     [%  END;
117                     END %]
118                 </table>
119             </div>
120         </div>
121         </form>
122     </div>
123     [% END %]
124 </div>
125 [% END %]