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