]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/templates/default/opac/myopac/holds/edit.tt2
Clean up unneeded alt txt; rework "Add to my list"
[Evergreen.git] / Open-ILS / web / templates / default / opac / myopac / holds / edit.tt2
1 [%  PROCESS "default/opac/parts/header.tt2";
2     PROCESS "default/opac/parts/misc_util.tt2";
3     PROCESS "default/opac/parts/org_selector.tt2";
4     WRAPPER "default/opac/parts/base.tt2" +
5         "default/opac/parts/myopac/base.tt2";
6     myopac_page = "holds"; # in this case, just for tab coloring.
7
8     hold = 0;
9     FOR h IN ctx.holds;
10         IF h.hold.hold.id == CGI.param('id');
11             hold = h;
12             ahr = hold.hold.hold;
13             attrs = {marc_xml => hold.marc_xml};
14             PROCESS get_marc_attrs args=attrs;
15             hold.human_status = PROCESS get_hold_status hold=hold;
16
17             # Do this up front to avoid verbosity later
18             expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
19             thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
20             LAST;
21         END;
22     END;
23 %]
24 <div class="pad-bottom-five">
25     <div class="header_middle">
26         <span id="acct_holds_header float-left">[% l('Editing Hold') %]</span>
27         &nbsp; &nbsp; &nbsp; &nbsp;
28         <a href="[% ctx.opac_root %]/myopac/holds">[% l('List all holds') %]</a>
29     </div>
30     <div id="hold_editor">
31         [% IF hold %]
32             <h1>[% attrs.title %]</h1>
33             <h2>[% attrs.author %]</h2>
34             [% IF attrs.format_icon %]<p>
35                 <strong>[% l('Format:') %]</strong>
36                 <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title %]" />
37             </p>[% END %]
38             <p>
39                 <strong>[% l('Status') %]</strong>: [% hold.human_status %]
40             </p>
41             <form method="POST">
42                 <table id="hold_editor_table">
43                     <tr>
44                         <th>
45                             <input type="hidden" name="action" value="edit" />
46                             <input type="hidden" name="hold_id"
47                                 value="[% ahr.id %]" />
48                             [% l('Pickup library') %]
49                         </th>
50                         <td>
51                             [% PROCESS build_org_selector
52                                 name='pickup_lib' value=ahr.pickup_lib %]
53                         </td>
54                     </tr>
55                     <tr>
56                         <th>
57                             [% l('Cancel unless filled by') %]
58                         </th>
59                         <td>
60                             <input type="text" name="expire_time"
61                                 value="[% expire_time | html %]" />
62                         </td>
63                         <td class="fmt-note">
64                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
65                             <!-- XXX TODO pick out a minimal, simple, reliable
66                             calendar widget that's not part of some giant,
67                             bloated framework and doesn't do anything at onload.
68                             -->
69                         </td>
70                     </tr>
71                     <tr>
72                         <th>
73                             [% l('Active?') %]
74                         </th>
75                         <td>
76                             <select name="frozen">
77                                 <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
78                                     [% l('Yes, this hold is active now') %]
79                                 </option>
80                                 <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
81                                     [% l('No, this hold is suspended') %]
82                                 </option>
83                             </select>
84                         </td>
85                     </tr>
86                     <tr>
87                         <th>
88                             [% l('If suspended, activate on') %]
89                         </th>
90                         <td>
91                             <input type="text" name="thaw_date"
92                                 value="[% thaw_date | html %]" />
93                         </td>
94                         <td class="fmt-note">
95                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
96                         </td>
97                     </tr>
98                     <tr>
99                         <td colspan="2" class="hold-editor-controls">
100                             <input type="image"
101                                 src="[% ctx.media_prefix %]/images/btnSubmit.png"
102                                 alt="[% l('Submit') %]"
103                                 title="[% l('Submit') %]" />
104                             <a href="[% ctx.opac_root %]/myopac/holds"><img
105                                 src="[% ctx.media_prefix %]/images/btnCancel.png"
106                                 alt="[% l('Cancel') %]"
107                                 title="[% l('Cancel') %]" /></a>
108                         </td>
109                     </tr>
110                 </table>
111             </form>
112         [% ELSE;
113             l('Hold not found');
114         END %]
115     </div>
116 </div>
117 [% END %]