Merge remote branch 'working/user/rri/ttopac' into template-toolkit-opac-master-merge
[Evergreen.git] / Open-ILS / src / templates / default / opac / myopac / circs.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 <div id='myopac_checked_div' style="padding:0px;">
6
7     <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
8         <div class="align selected">
9             <img src="[% ctx.media_prefix %]/images/sub_checked_out_on.jpg" />
10         </div>
11         <div class="align">
12             <a href="circ_history"><img
13                 src="[% ctx.media_prefix %]/images/sub_checked_hist_off.jpg" /></a>
14         </div>
15         <div class="clear-both"></div>
16     </div>
17
18     <div class="header_middle">
19         <span class="float-left">[% l('Current Items Checked Out') %]</span>
20         <span class="float-right">
21             <a class="hide_me" href="#">[% l('Export List') %]</a>
22         </span>
23     </div>
24     <div class="clear-both"></div>
25     [% IF ctx.circs.size < 1 %]
26     <div class="warning_box">
27         <big><strong>[% l('You have no items checked out.') %]</strong></big>
28     </div>
29     [% ELSE %]
30     [% IF ctx.success_renewals %]
31     <div class="renew-summary">
32         [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
33     </div>
34     [% END %]
35     [% IF ctx.failed_renewals %]
36     <div class="renew-summary red">
37         [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
38     </div>
39     [% END %]
40     <div id='checked_main'>
41         <form method="POST" id="circ-form"
42             onsubmit="return confirm('[% l("Are you sure you wish to renew the selected item(s)?") %]');">
43         <table cellpadding='0' cellspacing='0' class="item_list_padding">
44             <tr>
45                 <td>
46                     <select name="action">
47                         <option value="renew">[% l('Renew Selected Titles') %]</option>
48                     </select>
49                 </td>
50                 <td style="padding-left:9px;">
51                     <input type="image"
52                         alt="[% l('Go') %]" title="[% l('Go') %]"
53                         src="[% ctx.media_prefix %]/images/go-btn.png" /></a>
54                 </td>
55                 <td style="padding-left:5px;">
56                     <a href="#"><img alt="Renewing Help"
57                         src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
58                 </td>
59             </tr>
60         </table>
61         <table id="acct_checked_main_header" cellpadding='0' cellspacing='0'
62             border='0'>
63             <tr>
64                 <td width="1%" style="padding-left:10px;">
65                     <input type="checkbox" id="check_all_checked"
66                         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;}"
67                     />
68                 </td>
69                 <td width="40%" style="padding-left:5px;">
70                     <span title="Click to sort" class='pointer'>
71                         Title
72                     </span> /
73                     <span title="Click to sort" class='pointer'>
74                         Author
75                     </span>
76                 </td>
77                 <td width="8%" style="padding-right:5px;" align="center">
78                     <span title="Click to sort" class='pointer'>Renews<br />Left
79                     </span>
80                 </td>
81                 <td width="13%" style="padding-left:5px;">
82                     <span title="Click to sort" class='pointer'>Due Date</span>
83                 </td>
84                 <td width="16%">
85                     <span title="Click to sort" class='pointer'>barcode</span>
86                 </td>
87                 <td width="22%">
88                     <span title="Click to sort" class='pointer'>call number</span>
89                 </td>
90             </tr>
91         </table>
92    
93         <div id="checked_temp_parent">
94             <div id="acct_checked_temp">
95                 <table cellpadding='0' cellspacing='0' border='0'
96                     style="margin-top:5px;">
97                     [% FOR circ IN ctx.circs;
98                         attrs = {marc_xml => circ.marc_xml};
99                         PROCESS get_marc_attrs args=attrs; %]
100                     <tr>
101                         <td width="1%" style="padding-left:10px;" valign="top">
102                             <input type="checkbox" name="circ"
103                                 [% IF circ.circ.renewal_remaining < 1; l('disabled="disabled"'); END %]
104                                 value="[% circ.circ.id %]" />
105                         </td>
106                         <td width="40%"
107                             style="padding-left:5px;padding-bottom:10px;"
108                             name="author">
109                             <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title %]</a>
110                             [% IF attrs.author %] /
111                             <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author %]</a>
112                             [% END %]
113                         </td>
114                         <td width="8%" name="renewals" align="center">
115                             [% circ.circ.renewal_remaining %]
116                         </td>
117                         <td width="13%" style="padding-left:5px;"
118                             name="due_date">
119                             [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT) %]
120                         </td>
121                         <td width="16%" name="barcode">
122                             [% circ.circ.target_copy.barcode %]
123                         </td>
124                         <td width="22%" name="call_number">
125                             [% circ.circ.target_copy.call_number.label %]
126                         </td>
127                     </tr>
128                     [%  IF circ.renewal_response AND
129                             circ.renewal_response.textcode != 'SUCCESS' %]
130                     <tr>
131                         <td colspan="6">[%# XXX colspan="0" does not work in IE %]
132                             <span class="failure-text" title="[% circ.renewal_response.textcode %] / [% circ.renewal_response.payload.fail_part %]">
133                                 [% circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode %]
134                             </span>
135                         </td>
136                     </tr>
137                     [%  END;
138                     END %]
139                 </table>
140             </div>
141         </div>
142         </form>
143     </div>
144     [% END %]
145     <div id='non_cat_circs_div' class='hide_me'>
146         <br/>
147         <div style='text-align: center'><b>[% l("Other Circulations") %]</b></div>
148         <table class='data_grid' width='100%'>
149             <thead>
150                 <tr>
151                     <td>[% l("Circulating Library") %]</td>
152                     <td>[% l("Circulation Type") %]</td>
153                     <td>[% l("Please return by ...") %]</td>
154                 </tr>
155             </thead>
156             <tbody id='non_cat_circs_tbody'>
157                 <tr id='non_cat_circs_row'>
158                     <td name='circ_lib'/>
159                     <td name='item_type'/>
160                     <td name='circ_time'/>
161                 </tr>
162             </tbody>
163         </table>
164     </div>
165 </div>
166 [% END %]