]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/circs.tt2
LP#1268636 My account various repairs
[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         <div>
37             <span>
38                 <select name="action" title="[% l('Select Action') %]">
39                     <option value="renew">[% l('Renew Selected Titles') %]</option>
40                 </select>
41             </span>
42             <span style="padding-left:9px;">
43                 <input type="submit"
44                     value="[% l('Go') %]"
45                     title="[% l('Go') %]"
46                     class="opac-button" />
47             </span>
48             <span style="padding-left:5px;">
49                 <a href="#"><img 
50                     alt="[% l('Renewing Help') %]"
51                     title="[% l('Actions for checked out items') %]"
52                     src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
53             </span>
54         </div>
55
56         <table id="acct_checked_main_header" 
57             title="[% l('Items Checked Out') %]"
58             class="table_no_border_space table_no_cell_pad item_list_padding">
59             <thead>
60             <tr>
61                 <th class="checkbox_column">
62                     <input type="checkbox" id="check_all_checked"
63                         title="[% l('Select All Items') %]"
64                         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;}"
65                     />
66                 </th>
67                 <th>[% l('Title / Author') %]</th>
68                 <th>[% l('Renewals Left') %]</th>
69                 <th>[% l('Due Date') %]</th>
70                 <th>[% l('Barcode') %]</th>
71                 <th>[% l('Call number') %]</th>
72             </tr>
73             </thead>
74                 <tbody>
75                     [% FOR circ IN ctx.circs;
76                         attrs = {marc_xml => circ.marc_xml};
77                         PROCESS get_marc_attrs args=attrs; %]
78                     <tr>
79                         <td class="checkbox_column" valign="top">
80                             <input type="checkbox" name="circ"
81                                 title="[% l('Item Selected') %]"
82                                 [% IF circ.circ.renewal_remaining < 1 %] disabled="disabled" [% END %]
83                                 value="[% circ.circ.id %]" />
84                         </td>
85                         <td name="author">
86                             [% IF circ.circ.target_copy.call_number.id == -1 %]
87                                 [% circ.circ.target_copy.dummy_title | html %]
88                             [% ELSIF attrs.title %]
89                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ 
90                                 circ.circ.target_copy.call_number.record.id) %]"
91                                 name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
92                             [% END %]
93                             [% IF circ.circ.target_copy.call_number.id == -1 %] /
94                                 [% circ.circ.target_copy.dummy_author | html %]
95                             [% ELSIF attrs.author %] /
96                             <a href="[% mkurl(ctx.opac_root _ '/results',
97                                 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
98                             ) %]">[% attrs.author | html %]</a>
99                             [% END %]
100                         </td>
101                         <td name="renewals">
102                             [% circ.circ.renewal_remaining %]
103                         </td>
104                         [%
105                             due_date = ctx.parse_datetime(circ.circ.due_date);
106                             due_class = (date.now > date.format(due_date, '%s')) ? 'error' : '';
107                         %]
108                         <td name="due_date" class='[% due_class %]'>
109                             [% date.format(due_date, DATE_FORMAT) %]
110                         </td>
111                         <td name="barcode">
112                             [% circ.circ.target_copy.barcode | html %]
113                         </td>
114                         <td name="call_number">
115                             [% circ.circ.target_copy.call_number.label | html %]
116                         </td>
117                     </tr>
118                     [%  IF circ.renewal_response AND
119                             circ.renewal_response.textcode != 'SUCCESS' %]
120                     <tr>
121                         <td colspan="6">[%# XXX colspan="0" does not work in IE %]
122                             <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.payload.fail_part | html %]">
123                                 [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
124                             </span>
125                         </td>
126                     </tr>
127                     [%  END;
128                     END %]
129                 </tbody>
130             </table>
131         </form>
132     </div>
133     [% END %]
134 </div>
135 [% END %]