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