]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/holds.tt2
Tpac; repair format icon display in holds lists
[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 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" 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;}"/>
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[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
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 title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
150                             [% END %]
151                         </div>
152                     </td>
153                     <td width="136">
154                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
155                     </td>
156                     <td width="104">
157                         <!-- <input
158                             title="Enter a date (e.g. 10/21/2010)"
159                             class="hide_me" style="width:91px;"
160                             name="activate_box" type="text" /> -->
161                         [% IF ahr.frozen == 't' AND
162                                 ahr.thaw_date;
163                             date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
164                         END %]
165                     </td>
166                     <td width="106">
167                         <!-- <input title="[% l('Enter a date (e.g. 10/21/2010)') %]"
168                             class="hide_me" style="width:91px;"
169                             name="hold_expires_box" type="text" />-->
170                         [% IF ahr.expire_time;
171                             date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
172                         END %]
173                     </td>
174                     <td width="95">
175                         <!-- <select name="hold_active_sel"
176                             style="width:90px;" class="hide_me">
177                             <option value="f">Active</option>
178                             <option value="t">Suspended</option>
179                         </select> -->
180                         [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
181                     </td>
182                     <td width="110">
183                         <div name="acct_holds_status"
184                             style="margin-top:10px;margin-bottom:10px;">
185                             [% PROCESS get_hold_status hold=hold; %]
186                         </div>
187                     </td>
188                     <td class="opac-auto-161">
189                         <a href="[% ctx.opac_root %]/myopac/holds/edit?id=[% ahr.id %]">Edit</a>
190                     </td>
191                 </tr>
192                 [% END %]
193             </tbody>
194         </table>
195         [% END %]
196         </form>
197     </div>
198
199     <span id='myopac.holds.cancel.confirm' class='hide_me'>[% l("Are you sure you wish to cancel the selected holds?") %]</span>
200     <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>
201     <span id='myopac.holds.thaw.confirm' class='hide_me'>[% l("Are you sure you wish to activate the selected holds?") %]</span>
202     <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>
203     <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>
204
205     <table width='100%' id='myopac_holds_processing' class='hide_me'>
206         <tr><td>[% l("Processing holds... This may take a moment.") %]</td></tr>
207     </table>
208    
209     <span class='hide_me' id='myopac_holds_cancel_verify'>
210         [% l("If you wish to cancel the selected hold, click OK, otherwise click Cancel.") %]
211     </span>
212 </div>
213 <div id='myopac_holds_thaw_date_form' class='hide_me'>
214     <div id='myopac_holds_freeze_select_thaw'>
215         [% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]
216     </div>
217     <p>
218         <input size='10' maxlength='10'
219             type='text' id='myopac_holds_thaw_date_input' />
220     </p>
221     <p>
222         <button>[% l("Submit") %]</button>
223     </p>
224 </div>
225 [% END %]