]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/place_hold.tt2
Alert or block holds on available copy at same pickup lib
[Evergreen.git] / Open-ILS / web / templates / default / opac / parts / place_hold.tt2
1 [%  PROCESS "default/opac/parts/misc_util.tt2";
2     attrs = {marc_xml => ctx.marc_xml};
3     PROCESS get_marc_attrs args=attrs;
4 %]
5 <div>
6     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
7         [% IF ctx.hold_success %]
8         <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
9         [% ELSIF ctx.hold_failed %]
10         <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
11             [% IF ctx.hold_local_block %]
12             <div>[% l("There is already a copy available at your local library.") %]</div>
13             [% ELSIF ctx.hold_failed_event || ctx.hold_local_alert %]
14         <div>
15             <strong>[% l('Problem:') %]</strong>
16             <span title="[% ctx.hold_failed_event.textcode %]">
17                 <em>[% ctx.hold_failed_event.desc ||
18                         ctx.hold_failed_event.payload.fail_part ||
19                         ctx.hold_failed_event.textcode ||
20                         (ctx.hold_local_alert ?
21                             l("There is already a copy available at your local library.") :
22                             l("Unknown problem")) %]</em>
23             </span>
24
25             [% IF ctx.hold_copy_available %]<p>
26             [% l('Find a copy in the shelving location, "[_1]."',
27                 ctx.hold_copy_available.location) %]
28             </p>[% END %]
29
30             [% IF ctx.could_override || ctx.hold_local_alert %]
31             <p>
32                 <big>[% l("You have permission to place this hold anyway.") %]</big>
33                 <br />
34                 [% l("Click submit below to override the system's objection and place your hold.") %]
35             </p>
36             <form method="POST">
37                 <input type="hidden" type="name" name="override" value="1" />
38                 [% FOR k IN ctx.orig_params.keys %]
39                 <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
40                 [% END %]
41                 <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
42                     alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
43             </form>
44             [% END %]
45         </div>
46             [% END;
47         ELSIF ctx.hold_local_block;
48             l("There is already a copy available at your local library");
49         ELSE %]
50         <form method="POST">
51             <br/>
52             <input type="hidden" name="hold_target"
53                 value="[% CGI.param('hold_target') | html %]" />
54             <input type="hidden" name="hold_type"
55                 value="[% CGI.param('hold_type') | html %]" />
56             [%
57                 new_redirect_to = ctx.referer;
58                 IF new_redirect_to.match('redirect_to');
59                     new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
60                 ELSE;
61                     new_redirect_to = new_redirect_to | replace('^http:', 'https:');
62                 END;
63             %]
64             <input type="hidden" name="redirect_to"
65                 value="[% new_redirect_to | html %]" />
66             <h1>Place Hold</h1>
67             [% IF ctx.is_staff %]
68             <p class="staff-hold">
69                 <input type="radio" id="hold_usr_is_requestor_not"
70                     onchange="staff_hold_usr_input_disabler(this);"
71                     name="hold_usr_is_requestor" value="0" />
72                 <label for="hold_usr_is_requestor_not">
73                     [% l("Place hold for patron by barcode:") %]
74                 </label>
75                 <input type="text" name="hold_usr" id="hold_usr_input" /><br />
76                 <span>
77                     <input type="radio" id="hold_usr_is_requestor"
78                         onchange="staff_hold_usr_input_disabler(this);"
79                         name="hold_usr_is_requestor" value="1" />
80                     <label for="hold_usr_is_requestor">
81                         [% l("Place this hold for me ([_1] [_2])",
82                         ctx.user.first_given_name, ctx.user.family_name) %]
83                     </label>
84                 </span>
85             </p>
86             [% END %]
87             <p>
88                 [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
89                 You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
90                 If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
91                 [% END %]
92             </p>
93             <p>
94                 [% l('Pickup location:') %]
95                 [% PROCESS "default/opac/parts/org_selector.tt2";
96                     PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
97             </p>
98             <p>
99                 [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
100                 services, please select "Outreach" to have the item delivered
101                 during your scheduled visit.[% END %]
102             </p>
103             <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
104                 alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
105             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
106             <a href="javascript:history.go(-1);" id="holds_cancel"><img
107                 alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
108         </form>
109         <br /><br />
110         <p>
111             [% |l %]* If you need your item today, and it is checked in at your
112             library, please place your hold and then call your library to set it
113             aside. Placing a hold without calling the library will increase your
114             wait time.[% END %]
115             <br /><a href="#">[% l('Library phone numbers.') %]</a>
116         </p>
117         <p>
118             [% |l %]* For best possible service, we recommend keeping 
119             a printed copy of your most recent holds list.[% END %]
120         </p>
121         [% END %] <!-- ctx.hold_success -->
122         <table width='90%' border="1" class="hide_me">
123             <tbody>
124                 <tr>
125                     <td class='holds_cell color_1' 
126                         align='center' colspan='2'>[% l("Create / Edit a Hold") %]</td>
127                 </tr>
128                 <tr>
129                     <td class='holds_cell'>[% l("Recipient") %]:</td>
130                     <td class='holds_cell' id='holds_recipient'> </td>
131                 </tr>
132                 <tr>
133                     <td class='holds_cell'>[% l("Title:") %]</td>
134                     <!-- <td class='holds_cell' id='holds_title'> </td> -->
135                 </tr>
136                 <tr>
137                     <td class='holds_cell'>[% l("Author") %]</td>
138                     <td class='holds_cell' id='holds_author'> </td>
139                 </tr>
140                 <tr>
141                     <td class='holds_cell'>[% l("Format") %]</td>
142                     <td class='holds_cell' id='holds_format'> </td>
143                 </tr>
144                 <tr id='hold_physical_desc_row'>
145                     <td class='holds_cell'>[% l("Physical Description:") %]</td>
146                     <td class='holds_cell' id='holds_physical_desc'> </td>
147                 </tr>
148
149                 <tr class='hide_me' id='holds_cn_row'>
150                     <td class='holds_cell'>[% l("Call Number:") %]</td>
151                     <td class='holds_cell'><b id='holds_cn'/> </td>
152                 </tr>
153
154                 <tr class='hide_me' id='holds_copy_row'>
155                     <td class='holds_cell'>[% l("Copy Barcode:") %]</td>
156                     <td class='holds_cell'><b id='holds_copy'/> </td>
157                 </tr>
158
159                 <tr class='hide_me' id='holds_type_row'>
160                     <td class='holds_cell'>[% l("Hold Type:") %]</td>
161                     <td class='holds_cell hide_me' id='holds_is_cn'>
162                         <b>[% l("Volume Hold") %]</b>
163                     </td>
164                     <td class='holds_cell hide_me' id='holds_is_copy'>
165                         <b>[% l("Copy Hold") %]</b>
166                     </td>
167                 </tr>
168                 <tr>
169                     <td class='holds_cell'>[% l("Contact telephone number") %]:</td>
170                     <td class='holds_cell'>
171                         <input id='holds_phone' size='13' maxlength='12'/>
172                         <span style='margin-left: 4px; font-size: 7pt;'>
173                             [% l("(XXX-YYY-ZZZZ)") %]
174                         </span>
175                     </td>
176                 </tr>
177                 <tr>
178                     <td class='holds_cell'>[% l("Enable phone notifications for this hold?") %]</td>
179                     <td class='holds_cell'>
180                         <input type='checkbox' id='holds_enable_phone'
181                             checked='checked' />
182                     </td>
183                 </tr>
184                 <tr>
185                     <td class='holds_cell'>[% l("Contact email address") %]:</td>
186                     <td class='holds_cell' id='holds_email'> 
187                         <span class='hide_me' id='holds.no_email'>
188                            ([% l("Patron has no configured email address") %])<br/>
189                            ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
190                         </span>
191                         <span class='hide_me' id='holds.no_email.xul'>
192                            [% l("(Patron has no configured email address)") %] 
193                         </span>
194                     </td>
195                 </tr>
196                 <tr>
197                     <td class='holds_cell'>[% l("Enable email notifications for this hold?") %]</td>
198                     <td class='holds_cell'>
199                         <input type='checkbox' id='holds_enable_email'
200                             checked='checked'/>
201                     </td>
202                 </tr>
203                 <!--
204                 <tr id='holds_depth_selector_row' class='hide_me'>
205                     <td class='holds_cell'>Hold Range</td>
206                     <td class='holds_cell'>
207                         <select id='holds_depth_selector'></select>
208                     </td>
209                 </tr>
210                 -->
211                 <tr>
212                     <td class='holds_cell'>[% l("Pickup location") %]</td>
213                     <td class='holds_cell'>
214                         <!-- <select id='holds_org_selector'> </select> -->
215                     </td>
216                 </tr>
217
218                 <tr>
219                     <td class='holds_cell'>[% l("Expiration date") %]</td>
220                     <td class='holds_cell'>
221                         <input size='10' maxlength='10'
222                          id='holds_expire_time' />
223                     </td>
224                 </tr>
225
226                 <tr>
227                     <td class='holds_cell'>
228                         [% l("Suspend this hold") %]
229                         <a class='classic_link'
230                             href='#'>[% l("(Help)") %]</a>
231                         </td>
232                     <td class='holds_cell'>
233                         <input type='checkbox' id='holds_frozen_chkbox' /> 
234                     </td>
235                 </tr>
236                 <tr id='hold_frozen_thaw_row' class='hide_me'>
237                     <td class='holds_cell'>
238                         <!-- XXX TODO there used to be script here dealing with
239                         frozen holds -->
240                         [% l("Automatically activate hold on:") %]
241                     </td>
242                     <td class='holds_cell'>
243                         <input size='10' maxlength='10'
244                             id='holds_frozen_thaw_input' />
245                     </td>
246                 </tr>
247
248                 <tr id='holds_alt_formats_row_extras' class='hide_me'>
249                     <td colspan='2' align='center'>
250                         <div style='padding: 8px;'>
251                             <a class='classic_link' href='#'
252                                 style='padding: 5px;'>[% l("Advanced Hold Options") %]</a>
253                         </div>
254                     </td>
255                 </tr>
256
257                 <tr id='holds_alt_formats_row' class='hide_me'>
258
259                     <td class='holds_cell'>
260                         <div style='margin-bottom: 5px;'>
261                             <span>[% l("Acceptable Alternative Formats:") %] </span>
262                             <span><a class='classic_link red' href='#'>[% l("(Help)") %]</a></span>
263                         </div>
264                         <div>[% l("(control-click to select multiple formats)") %]</div>
265                     </td>
266
267                     <td class='holds_cell'>
268                         <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
269                             <option value='at'    class='hide_me'>[% l("Books") %]</option>
270                             <option value='at-d' class='hide_me'>[% l("Large Print Books") %]</option>
271                             <option value='i'        class='hide_me'>[% l("Audiobooks") %]</option>
272                             <option value='g'        class='hide_me'>[% l("Video Recordings") %]</option>
273                             <option value='j'        class='hide_me'>[% l("Music") %]</option>
274                         </select>
275                     </td>
276                 </tr>
277                 <tr>
278                     <td class='holds_cell' align='center' colspan='2'>
279                         <!-- <button id='holds_submit'>[% l("Place Hold") %]</button> -->
280                         <button class='hide_me' id='holds_update'>[% l("Update Hold") %]</button>
281                         <span style='padding: 20px;'> </span>
282                         <!-- <button id='holds_cancel'>[% l("Cancel") %]</button> -->
283                     </td>
284                 </tr>
285             </tbody>
286         </table>
287         <span class='hide_me' id='holds_bad_phone'>
288             [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
289         </span>
290         <span class='hide_me' id='hold_not_allowed'>
291             [% |l %]No items were found that could fulfill the requested holds.  
292                 It's possible that choosing a different format will result in a successful hold.  
293                 It is also possible that you have exceeded the number of allowable holds.  
294                 For further information, please consult your local librarian.[% END %]
295         </span>
296     </div>
297     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
298         <select id="holdsCacheSel" class="hide_me"></select><br />
299         <a href="#">Place hold on selected</a><br />
300         <a href="#">Remove selected</a>
301         
302         <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
303             style="margin-top:10px;">
304             <tr>
305                 <td width="1%" style="padding-left:10px;">
306                     <input type='checkbox' title='Select All'
307                         id='anon_selector' />
308                 </td>
309                 <td width="1%">
310                 </td>
311                 <td width="98%" style="padding-left:40px;">
312                     <strong>Title</strong>
313                 </td>
314             </tr>
315         </table>
316         <table width='100%' style="margin-left:7px;margin-bottom:10px;">
317             <thead>
318                 <tr><td width='20'></td><td width='30'></td><td></td></tr>
319             </thead>
320             <tbody id="anonListParent">
321                 <tr id="anonListTemp">
322                   <td><input type='checkbox' name='anon_selector' /></td>
323                   <td name="curr_row"></td>
324                   <td name="title"></td>
325                 </tr>
326             </tbody>
327         </table>
328         <a href="#">Back to search results</a>
329     </div>
330
331     <span class='hide_me' id='format_words'>
332         <span name='at'>[% l("Books") %]</span>
333         <span name='at-d'>[% l("Large Print Books") %]</span>
334         <span name='i'>[% l("Audiobooks") %]</span>
335         <span name='g'>[% l("Video Recordings") %]</span>
336         <span name='j'>[% l("Music") %]</span>
337         <span name='m'>[% l("Electronic Resources") %]</span>
338     </span>
339
340     <span class='hide_me' id='holds_explain_adv'>
341         [% |l %]If you wish to broaden the scope of your hold to include other versions of this title, 
342         select the formats that would be acceptable.  The first available copy will be sent to you.[% END %]
343     </span>
344
345     <span class='hide_me' id='holds_pick_good_org'>[% l("Please select a physical location where your hold can be delivered.") %]</span>
346     <span class='hide_me' id='hold_dup_exists'>[% l("A hold already exists on the requested item.") %]</span>
347     <span class='hide_me' id='hold_dup_exists_override'>[% l("A hold already exists on the requested item. Would you like to create the hold anyway?") %]</span>
348
349     <span id='hold_failed_patron_barred' class='hide_me'>
350         [% |l %]PATRON BARRED. Please see any notes in the "Staff Notes" section of your 
351         "My Account" page or contact your local library.[% END %]
352     </span>
353
354     <span id='invalid_hold' class='hide_me'>
355         [% |l %]This hold is no longer valid. It's likely that the target for the hold was 
356         deleted from the system.  Please cancel this hold and place a new one.[% END %]
357     </span>
358     <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
359 </div>