1 [% PROCESS "opac/parts/misc_util.tt2";
2 PROCESS "opac/parts/hold_error_messages.tt2";
7 <!-- TODO: CSS for big/strong-->
9 <div id='holds_box' class='canvas' style='margin-top: 6px;'>
10 <h1>[% l('Place Hold') %]</h1>
13 <input type="hidden" type="name" name="override" value="1" />
14 [% FOR k IN ctx.orig_params.keys %]
15 <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
18 <table id='hold-items-list'>
20 [% FOR hdata IN ctx.hold_data;
21 attrs = {marc_xml => hdata.marc_xml};
22 PROCESS get_marc_attrs args=attrs %]
27 IF hdata.could_override || hdata.hold_local_alert;
28 override_possible = 1;
33 type="checkbox" name="hold_target" value="[% hdata.target.id | html %]"
34 [% IF override %] checked='checked' [% ELSE %] disabled='disabled' [% END %]/>
37 <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
39 [% IF hdata.parts.size > 0 %]
40 <div style='padding-left: 10px'>
41 <span>[% hdata.part_required ? l('Select a Part:') : l('Select a Part (optional):') %]</span>
43 [% IF !hdata.part_required %]
44 <option [% UNLESS hdata.selected_part %]selected='selected'[% END %] value=''>[% l('- All Parts -') %]</option>
46 [% FOR part IN hdata.parts %]
47 <option value='[% part.id %]'
48 [% IF (hdata.selected_part || '') == part.id %]selected='selected'[% END %]>[% part.label | html %]</option>
53 <input type='hidden' name='part' value=''/>
57 [% IF hdata.hold_success %]
59 <div class='success'>[% l("Hold was successfully placed"); %]</div>
61 [% ELSIF hdata.hold_failed; any_failures = 1 %]
63 <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
64 [% IF hdata.hold_local_block %]
65 <div>[% l("There is already a copy available at your local library.") %]</div>
66 [% ELSIF hdata.hold_failed_event || hdata.hold_local_alert %]
68 <span class='hold-items-list-problem'>[% l('Problem:') %]</span>
69 <span title="[% hdata.hold_failed_event.textcode | html %]">
71 fail_part_key = hdata.hold_failed_event.payload.fail_part;
72 event_key = hdata.hold_failed_event.textcode;
75 FAIL_PART_MSG_MAP.$fail_part_key ||
76 EVENT_MSG_MAP.$event_key ||
77 l(hdata.hold_failed_event.desc) ||
78 hdata.hold_failed_event.payload.fail_part ||
79 hdata.hold_failed_event.textcode ||
80 (hdata.hold_local_alert ?
81 l("There is already a copy available at your local library.") :
82 l("Unknown problem")) | html
84 [% IF event_key == 'PERM_FAILURE' %]
85 <div>[% l('Permission: "[_1]"', hdata.hold_failed_event.ilsperm) | html %]</div>
88 [% IF hdata.hold_copy_available %]
89 <p>[% l('Find a copy in the shelving location, "[_1]."', locname) | html %]</p>
99 [% IF override_possible %]
102 <div class='big-strong'>
103 [% |l %]You have permission to override some of the failed holds.<br/> Click Submit to override and place your hold on the selected items.[% END %]
105 <span style='padding-right: 10px;'>
106 <input type="submit" name="submit" value="[% l('Submit') %]"
107 title="[% l('Submit') %]" alt="[% l('Submit') %]"
108 class="opac-button" />
112 [% IF any_failures OR ctx.general_hold_error %]
113 <a href="[% CGI.param('redirect_to') || CGI.referer | html %]">[% l('Cancel') %]</a>
115 <a href="[% CGI.param('redirect_to') || CGI.referer | html %]">[% l('Continue') %]</a>