Docs: adding alt text to MARC Editor chapter images
[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/hold_status.tt2";
4     PROCESS "opac/parts/org_selector.tt2";
5     PROCESS "opac/parts/metarecord_hold_filters.tt2";
6     WRAPPER "opac/parts/myopac/base.tt2";
7     myopac_page = "holds"; # in this case, just for tab coloring.
8
9     hold = ctx.holds.0;
10     ahr = hold.hold.hold;
11     attrs = {marc_xml => hold.marc_xml};
12     PROCESS get_marc_attrs args=attrs;
13     hold.human_status = PROCESS get_hold_status hold=hold;
14
15     # Do this up front to avoid verbosity later
16     expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
17     thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
18 %]
19 <h3 class="sr-only">[% l('Edit Hold') %]</h3>
20 <div class="pad-bottom-five">
21     <div class="header_middle">
22         <span id="acct_holds_header float-left">[% l('Editing Hold') %]</span>
23         &nbsp; &nbsp; &nbsp; &nbsp;
24         <a href="[% ctx.opac_root %]/myopac/holds">[% l('List all holds') %]</a>
25     </div>
26     <div id="hold_editor">
27         [%  IF hold;
28                 title = attrs.title;
29                 IF ahr.hold_type == 'P';
30                     title = l('[_1] ([_2])', title, hold.hold.part.label);
31                 END 
32         %]
33             <h1>[% title | html %]</h1>
34             <h2>[% attrs.author | html %]</h2>
35             [% IF attrs.format_icon %]<p>
36                 <strong>[% l('Format:') %]</strong>
37                 <img src="[% attrs.format_icon %]" alt="[% attrs.format_label | html %]" title="[% attrs.format_label | html %]" />
38             </p>[% END %]
39             <p>
40                 <strong>[% l('Status') %]</strong>: [% hold.human_status %]
41             </p>
42             <form method="post">
43                 <table id="hold_editor_table">
44                     <tr>
45                         <th>
46                             <input type="hidden" name="action" value="edit" />
47                             <input type="hidden" name="hold_id"
48                                 value="[% ahr.id %]" />
49                             [% l('Pickup library') %]
50                         </th>
51                         <td>
52                             [% INCLUDE build_org_selector
53                                 name='pickup_lib' value=ahr.pickup_lib 
54                                 can_have_vols_only=1 hold_pickup_lib=1 %]
55                         </td>
56                     </tr>
57                     [% IF hold.hold.status < 3 OR hold.hold.status == 7 %]
58                     [%# The following actions cannot be performed on holds that 
59                         have already been captured... %]
60                     <tr>
61                         <th>
62                             [% l('Cancel unless filled by') %]
63                         </th>
64                         <td>
65                             <input type="text" name="expire_time"
66                                 value="[% expire_time | html %]" />
67                         </td>
68                         <td class="fmt-note">
69                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
70                             <!-- XXX TODO pick out a minimal, simple, reliable
71                             calendar widget that's not part of some giant,
72                             bloated framework and doesn't do anything at onload.
73                             -->
74                         </td>
75                     </tr>
76                     <tr>
77                         <th>
78                             [% l('Active?') %]
79                         </th>
80                         <td>
81                             <select name="frozen">
82                                 <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
83                                     [% l('Yes, this hold is active now') %]
84                                 </option>
85                                 <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
86                                     [% l('No, this hold is suspended') %]
87                                 </option>
88                             </select>
89                         </td>
90                     </tr>
91                     <tr>
92                         <th>
93                             [% l('If suspended, activate on') %]
94                         </th>
95                         <td>
96                             <input type="text" name="thaw_date"
97                                 value="[% thaw_date | html %]" />
98                         </td>
99                         <td class="fmt-note">
100                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
101                         </td>
102                     </tr>
103                     [% END %]
104                      
105                     <tr><td colspan='4'>
106                     [% IF hold.metarecord_filters.formats.size OR
107                         (hold.metarecord_filters.langs.size.defined && hold.metarecord_filters.langs.size > 1);
108                             PROCESS metarecord_hold_filters_selector 
109                                 hold_data=hold; END %]
110                     </td></tr>
111
112                     <tr>
113                         <td colspan="2" class="hold-editor-controls">
114                             <a href="[% ctx.opac_root %]/myopac/holds"><button 
115                                 class="opac-button">[% l('Go Back') %]</button></a>
116                             <input type="submit" value="[% l('Submit') %]" class="opac-button" />
117                         </td>
118                     </tr>
119                 </table>
120             </form>
121         [% ELSE;
122             l('Hold not found');
123         END %]
124     </div>
125 </div>
126 [% END %]