a8352233440bf81c5ce5009d6569005200012600
[working/Evergreen.git] / Open-ILS / src / templates / default / opac / myopac / holds.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 = "holds"  %]
5 <div id='myopac_holds_div'>
6
7     <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
8         <div class="align selected">
9             <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg"/>
10         </div>
11         <div class="align">
12             <a href='hold_history'><img src="[% ctx.media_prefix %]/images/sub_holds_hist_off.jpg"/></a>
13         </div>
14         <div class="clear-both"></div>
15     </div>
16
17     <div class="header_middle">
18         <span id="acct_holds_header" style="float:left;">
19             [%  IF CGI.param("available");
20                     l("Items Ready for Pickup");
21                 ELSE;
22                     l("Current Items on Hold");
23                 END
24             %]
25         </span>
26         <span style="float:right;">
27             <a class="hide_me" href="#">Export List</a>
28         </span>
29     </div>
30     <div class="clear-both"></div>
31     <div id='holds_main'>
32         <form method="POST">
33         <table cellpadding='0' cellspacing='0' class="opac-auto-097">
34             <tr>
35                 <td width="1">
36                     <select name="action" id="acct_holds_actions">
37                         <option id='myopac_holds_actions_none' value=''>
38                         -- [% l("Actions for selected holds") %] --
39                         </option>
40                         <option value='suspend'>
41                             [% l("Suspend") %]
42                         </option>
43                         <option value='activate'>
44                             [% l("Activate") %]
45                         </option>
46                         <!-- XXX maybe later <option value='thaw_date'>
47                             [% l("Set Active Date") %]
48                         </option> -->
49                         <option value='cancel'>
50                             [% l("Cancel") %]
51                         </option>
52                     </select>
53                 </td>
54                 <td width="1" style="padding-left:9px;">
55                     <input type="image"
56                         alt="[% l('Go') %]" title="[% l('Go') %]"
57                         src="[% ctx.media_prefix %]/images/go-btn.png" />
58                 </td>
59                 <td width="1" style="padding-left:5px;">
60                     <a href="#"><img
61                         alt="Holds Help"
62                         src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
63                 </td>
64                 <td align="right">
65                     [% l("Show") %] &nbsp; &nbsp;
66                     [% IF CGI.param("available") %]
67                     <a href="holds">[% l('all') %]</a> |
68                     <strong>[% l("only available") %]</strong>
69                     [% ELSE %]
70                     <strong>[% l("all") %]</strong> |
71                     <a href="holds?available=1">[% l("only available") %]</a>
72                     [% END %] &nbsp; &nbsp;
73                     [% l("holds") %]
74                     <select class="hide_me" id="holds_sort">
75                         <option value="">-- Sort By --</option>
76                         <option value="title">Title</option>
77                         <option value="pickup">PickUp Location</option>
78                         <option value="status">Status</option>
79                     </select>
80                 </td>
81             </tr>
82         </table>
83         [% IF ctx.holds.size < 1 %]
84         <div class="warning_box">
85             <big><strong>[% l('No holds found.') %]</strong></big>
86         </div>
87         [% ELSE %]
88         <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
89             border='0' width="100%">
90             <tr>
91                 <td width="36" align="center">
92                     <input type="checkbox" id="check_all_holds" />
93                 </td>
94                 <td width="138">
95                     <span title="Click to sort"
96                         style="cursor:pointer;">
97                         Title
98                     </span>
99                 </td>
100                 <td width="123">
101                     <span title="Click to sort" style="cursor:pointer;">Author</span>
102                 </td>
103                 <td width="64">
104                     <span title="Click to sort"
105                         style="cursor:pointer;">Format</span>
106                 </td>
107                 <td width="136">
108                     <span title="Click to sort"
109                         style="cursor:pointer;">Pickup Location</span>
110                 </td>
111                 <td width="104">Activate</td>
112                 <td width="106">Cancel if not<br />filled by</td>
113                 <td width="95">Active</td>
114                 <td width="172">
115                     <span title="Click to sort"
116                         style="cursor:pointer;">Status</span>
117                 </td>
118             </tr>
119         </table>
120         <div class="hide_me">
121             <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel"
122                 class="hide_me" style="width:125px;height:21px;"></select>
123         </div>
124
125         <table cellpadding='0' cellspacing='0' border='0' width="100%">
126             <tbody id="holds_temp_parent">
127                 [% FOR hold IN ctx.holds;
128                     attrs = {marc_xml => hold.marc_xml};
129                     PROCESS get_marc_attrs args=attrs;
130                     ahr = hold.hold.hold %]
131                 <tr id="acct_holds_temp" name="acct_holds_temp"
132                     class="acct_holds_temp">
133                     <td width="36" align="center" style="text-align:center;">
134                         <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
135                     </td>
136                     <td width="138">
137                         <div style="margin-top:10px;margin-bottom:10px;">
138                             <a href="[% ctx.opac_root %]/record/[% hold.hold.bre.id %]">[% attrs.title | html %]</a>
139                         </div>
140                     </td>
141                     <td width="123">
142                         <div style="margin-top:10px;margin-bottom:10px;">
143                             <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
144                         </div>
145                     </td>
146                     <td width="64">
147                         <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
148                             [% IF attrs.format_icon %]
149                             <img src="[% ctx.media_prefix %]/images/[% attrs.form_icon %]"
150                                 title="[% attrs.format %]" alt="[% attrs.format %]" />
151                             [% ELSE;
152                                 attrs.format;
153                                END %]
154                         </div>
155                     </td>
156                     <td width="136">
157                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
158                     </td>
159                     <td width="104">
160                         <!-- <input
161                             title="Enter a date (e.g. 10/21/2010)"
162                             class="hide_me" style="width:91px;"
163                             name="activate_box" type="text" /> -->
164                         [% IF ahr.frozen == 't' AND
165                                 ahr.thaw_date;
166                             date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
167                         END %]
168                     </td>
169                     <td width="106">
170                         <!-- <input title="[% l('Enter a date (e.g. 10/21/2010)') %]"
171                             class="hide_me" style="width:91px;"
172                             name="hold_expires_box" type="text" />-->
173                         [% IF ahr.expire_time;
174                             date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
175                         END %]
176                     </td>
177                     <td width="95">
178                         <!-- <select name="hold_active_sel"
179                             style="width:90px;" class="hide_me">
180                             <option value="f">Active</option>
181                             <option value="t">Suspended</option>
182                         </select> -->
183                         [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
184                     </td>
185                     <td width="110">
186                         <div name="acct_holds_status"
187                             style="margin-top:10px;margin-bottom:10px;">
188                             [% PROCESS get_hold_status hold=hold; %]
189                         </div>
190                     </td>
191                     <td class="opac-auto-161">
192                         <a href="[% ctx.opac_root %]/myopac/holds/edit?id=[% ahr.id %]">Edit</a>
193                     </td>
194                 </tr>
195                 [% END %]
196             </tbody>
197         </table>
198         [% END %]
199         </form>
200     </div>
201
202     <span id='myopac.holds.cancel.confirm' class='hide_me'>[% l("Are you sure you wish to cancel the selected holds?") %]</span>
203     <span id='myopac.holds.freeze.confirm' class='hide_me'>[% l("Are you sure you wish to suspend the selected holds?  If an item has already been selected to fulfill the hold, it will not be suspended") %]</span>
204     <span id='myopac.holds.thaw.confirm' class='hide_me'>[% l("Are you sure you wish to activate the selected holds?") %]</span>
205     <span id='myopac.holds.thaw_date.confirm' class='hide_me'>[% l("Are you sure you wish to change the activate date for the selected holds?") %]</span>
206     <span id='myopac.holds.freeze.select_thaw' class='hide_me'>[% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]</span>
207
208     <table width='100%' id='myopac_holds_processing' class='hide_me'>
209         <tr><td>[% l("Processing holds... This may take a moment.") %]</td></tr>
210     </table>
211    
212     <span class='hide_me' id='myopac_holds_cancel_verify'>
213         [% l("If you wish to cancel the selected hold, click OK, otherwise click Cancel.") %]
214     </span>
215 </div>
216 <div id='myopac_holds_thaw_date_form' class='hide_me'>
217     <div id='myopac_holds_freeze_select_thaw'>
218         [% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]
219     </div>
220     <p>
221         <input size='10' maxlength='10'
222             type='text' id='myopac_holds_thaw_date_input' />
223     </p>
224     <p>
225         <button>[% l("Submit") %]</button>
226     </p>
227 </div>
228 [% END %]