]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/holds.tt2
Merge remote-tracking branch 'eg-working/collab/berick/lp_888239_prevent_post-capture...
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / holds.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     PROCESS "opac/parts/hold_status.tt2";
4     WRAPPER "opac/parts/myopac/base.tt2";
5     myopac_page = "holds"  %]
6 <div id='myopac_holds_div'>
7
8     <div id="acct_holds_tabs">
9         <div class="align selected">
10             <a href='#'>[% l("Items on Hold") %]</a>
11         </div>
12         <div class="align">
13             <a href='hold_history'>[% l("Holds History") %]</a>
14         </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="submit" value="[% l('Go') %]"
56                         alt="[% l('Go') %]" title="[% l('Go') %]"
57                         class="opac-button" />
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 style="padding-left:5px;" class='error'>
65                     [%  IF ctx.hold_suspend_post_capture;
66                             l('One or more holds could not be suspended because<br/>the item is at (or en route to) the pickup library.');
67                         END;
68                     %]
69                 </td>
70                 <td align="right">
71                     [% l("Show") %] &nbsp; &nbsp;
72                     [% IF CGI.param("available") %]
73                     <a href="holds">[% l('all') %]</a> |
74                     <strong>[% l("only available") %]</strong>
75                     [% ELSE %]
76                     <strong>[% l("all") %]</strong> |
77                     <a href="holds?available=1">[% l("only available") %]</a>
78                     [% END %] &nbsp; &nbsp;
79                     [% l("holds") %]
80                     <select class="hide_me" id="holds_sort">
81                         <option value="">-- Sort By --</option>
82                         <option value="title">Title</option>
83                         <option value="pickup">PickUp Location</option>
84                         <option value="status">Status</option>
85                     </select>
86                 </td>
87             </tr>
88         </table>
89         [% IF ctx.holds.size < 1 %]
90         <div class="warning_box">
91             <big><strong>[% l('No holds found.') %]</strong></big>
92         </div>
93         [% ELSE %]
94         <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
95             border='0' width="100%">
96             <tr>
97                 <td width="36" align="center">
98                     <input type="checkbox" onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'hold_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
99                 </td>
100                 <td width="138">
101                     <span title="Click to sort"
102                         style="cursor:pointer;">
103                         Title
104                     </span>
105                 </td>
106                 <td width="123">
107                     <span title="Click to sort" style="cursor:pointer;">Author</span>
108                 </td>
109                 <td width="64">
110                     <span title="Click to sort"
111                         style="cursor:pointer;">Format</span>
112                 </td>
113                 <td width="136">
114                     <span title="Click to sort"
115                         style="cursor:pointer;">Pickup Location</span>
116                 </td>
117                 <td width="104">Activate</td>
118                 <td width="106">Cancel if not<br />filled by</td>
119                 <td width="95">Active</td>
120                 <td width="172">
121                     <span title="Click to sort"
122                         style="cursor:pointer;">Status</span>
123                 </td>
124             </tr>
125         </table>
126         <div class="hide_me">
127             <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel"
128                 class="hide_me" style="width:125px;height:21px;"></select>
129         </div>
130
131         <table cellpadding='0' cellspacing='0' border='0' width="100%">
132             <tbody id="holds_temp_parent">
133                 [% FOR hold IN ctx.holds;
134                     attrs = {marc_xml => hold.marc_xml};
135                     PROCESS get_marc_attrs args=attrs;
136                     ahr = hold.hold.hold %]
137                 <tr id="acct_holds_temp" name="acct_holds_temp"
138                     class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
139                     <td width="36" align="center" style="text-align:center;">
140                         <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
141                     </td>
142                     <td width="138">
143                         <div style="margin-top:10px;margin-bottom:10px;">
144                             <a href="[% ctx.opac_root %]/record/[% hold.hold.bre_id %]">[% attrs.title | html %]</a>
145                         </div>
146                     </td>
147                     <td width="123">
148                         <div style="margin-top:10px;margin-bottom:10px;">
149                             <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
150                         </div>
151                     </td>
152                     <td width="64">
153                         <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
154                             [% IF attrs.format_icon %]
155                             <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
156                             [% END %]
157                         </div>
158                     </td>
159                     <td width="136">
160                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
161                     </td>
162                     <td width="104">
163                         <!-- <input
164                             title="Enter a date (e.g. 10/21/2010)"
165                             class="hide_me" style="width:91px;"
166                             name="activate_box" type="text" /> -->
167                         [% IF ahr.frozen == 't' AND
168                                 ahr.thaw_date;
169                             date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
170                         END %]
171                     </td>
172                     <td width="106">
173                         <!-- <input title="[% l('Enter a date (e.g. 10/21/2010)') %]"
174                             class="hide_me" style="width:91px;"
175                             name="hold_expires_box" type="text" />-->
176                         [% IF ahr.expire_time;
177                             date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
178                         END %]
179                     </td>
180                     <td width="95">
181                         <!-- <select name="hold_active_sel"
182                             style="width:90px;" class="hide_me">
183                             <option value="f">Active</option>
184                             <option value="t">Suspended</option>
185                         </select> -->
186                         [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
187                     </td>
188                     <td width="110">
189                         <div name="acct_holds_status"
190                             style="margin-top:10px;margin-bottom:10px;">
191                             [% PROCESS get_hold_status hold=hold; %]
192                         </div>
193                     </td>
194                     <td class="opac-auto-161">
195                         <a href="[% ctx.opac_root %]/myopac/holds/edit?id=[% ahr.id %]">Edit</a>
196                     </td>
197                 </tr>
198                 [% END %]
199             </tbody>
200         </table>
201         [% END %]
202         </form>
203     </div>
204
205     <span id='myopac.holds.cancel.confirm' class='hide_me'>[% l("Are you sure you wish to cancel the selected holds?") %]</span>
206     <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>
207     <span id='myopac.holds.thaw.confirm' class='hide_me'>[% l("Are you sure you wish to activate the selected holds?") %]</span>
208     <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>
209     <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>
210
211     <table width='100%' id='myopac_holds_processing' class='hide_me'>
212         <tr><td>[% l("Processing holds... This may take a moment.") %]</td></tr>
213     </table>
214    
215     <span class='hide_me' id='myopac_holds_cancel_verify'>
216         [% l("If you wish to cancel the selected hold, click OK, otherwise click Cancel.") %]
217     </span>
218 </div>
219 <div id='myopac_holds_thaw_date_form' class='hide_me'>
220     <div id='myopac_holds_freeze_select_thaw'>
221         [% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]
222     </div>
223     <p>
224         <input size='10' maxlength='10'
225             type='text' id='myopac_holds_thaw_date_input' />
226     </p>
227     <p>
228         <button>[% l("Submit") %]</button>
229     </p>
230 </div>
231 [% END %]