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