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.
11 attrs = {marc_xml => hold.marc_xml};
12 PROCESS get_marc_attrs args=attrs;
13 hold.human_status = PROCESS get_hold_status hold=hold;
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) : '';
21 <div class="header_middle">
22 <h3>[% l('Edit Hold') %]</h3>
23 <a href="[% ctx.opac_root %]/myopac/holds" class="float-right"><i class="fas fa-list"></i> [% l('List all holds') %]</a>
26 <div id="hold_editor" class="mt-4">
27 [% IF hold; title = attrs.title;
28 IF ahr.hold_type == 'P';
29 title = l('[_1] ([_2])', title, hold.hold.part.label);
33 <h1>[% title | html %]</h1>
34 <h2>[% attrs.author | html %]</h2>
35 [% IF attrs.format_icon %]
36 <strong>[% l('Format:') %]</strong>
37 <img src="[% attrs.format_icon %]" alt="[% attrs.format_label | html %]" title="[% attrs.format_label | html %]" />
43 <strong>[% l('Status') %]</strong>: [% hold.human_status %]
46 <input type="hidden" name="action" value="edit" />
47 <input type="hidden" name="hold_id"
48 value="[% ahr.id %]" />
49 [% l('Pickup library') %]
51 [% INCLUDE build_org_selector
52 name='pickup_lib' value=ahr.pickup_lib
53 can_have_vols_only=1 hold_pickup_lib=1 %]
56 [% IF hold.hold.status < 3 OR hold.hold.status == 7 %]
57 [%# The following actions cannot be performed on holds that
58 have already been captured... %]
60 [% l('Cancel unless filled by') %]
62 <div class="input-group date" data-provide="datepicker">
63 <input type="text" class="form-control" name="expire_time" value="[% expire_time | html %]" data-date-format="mm/dd/yyyy">
64 <div class="input-group-addon">
65 <span class="glyphicon glyphicon-th"></span>
72 <select class="form-control" name="frozen">
73 <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
74 [% l('Yes, this hold is active now') %]
76 <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
77 [% l('No, this hold is suspended') %]
81 [% l('If suspended, activate on') %]
83 <div class="input-group date" data-provide="datepicker">
84 <input type="text" class="form-control" name="thaw_date" id="datepicker" value="[% thaw_date | html %]" data-date-format="mm/dd/yyyy">
85 <div class="input-group-addon">
86 <span class="glyphicon glyphicon-th"></span>
96 [% IF hold.metarecord_filters.formats.size OR
97 (hold.metarecord_filters.langs.size.defined && hold.metarecord_filters.langs.size > 1);
98 PROCESS metarecord_hold_filters_selector
99 hold_data=hold; END %]
102 <a href="[% ctx.opac_root %]/myopac/holds" class="btn btn-deny"><i class="fas fa-arrow-circle-left"></i> [% l('Go Back') %]</a>
103 <button class="btn btn-confirm m-2" type='submit'><i class="fas fa-save"></i> [% l('Save Changes') %]</button>
113 $('#datepicker').datepicker({
116 todayHighlight: true,
118 $('#datepicker').datepicker("setDate", new Date());