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