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";
6 limit = ctx.holds_limit;
7 offset = ctx.holds_offset;
8 count = ctx.holds_ids.size;
10 <h3 class="sr-only">[% l('My Holds') %]</h3>
11 <div id='myopac_holds_div'>
13 <div id="acct_holds_tabs">
14 <div class="align selected">
15 <a href='#'>[% l("Items on Hold") %]</a>
18 <a href='[% mkurl('hold_history', {}, ['limit','offset','available']) %]'>[% l("Holds History") %]</a>
22 <div class="header_middle">
23 <span id="acct_holds_header" style="float:left;">
24 [% IF CGI.param("available");
25 l("Items Ready for Pickup");
27 l("Current Items on Hold");
31 <span class='float-left' style='padding-left: 10px;'>
32 <a href='[% mkurl('holds', {limit => limit,offset => (offset - limit)}) %]'
33 [% IF offset <= 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
34 [% IF offset > 0 || count > limit;
36 WHILE curpage * limit < count;
37 IF curpage * limit == offset;
41 <a href='[% mkurl('holds', {limit => limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %]</a>
43 curpage = curpage + 1;
46 <a href='[% mkurl('holds', {limit => limit, offset => (offset + limit)}) %]'
47 [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
50 <span style="float:right;">
51 <a class="hide_me" href="#">[% l('Export List') %]</a>
54 <div class="clear-both"></div>
57 <table class="table_no_border_space table_no_cell_pad opac-auto-097"
58 title="[% l('Actions for Items on Hold') %]">
61 <select name="action" id="acct_holds_actions"
62 aria-label="[% l('Select your action for the selected holds') %]"
63 title="[% l('Select your action for the selected holds') %]">
64 <option id='myopac_holds_actions_none' value=''>
65 -- [% l("Actions for selected holds") %] --
67 <option value='suspend'>[% l("Suspend") %]</option>
68 <option value='activate'>[% l("Activate") %]</option>
69 <!-- XXX maybe later <option value='thaw_date'>[% l("Set Active Date") %]</option> -->
70 <option value='cancel'>[% l("Cancel") %]</option>
73 <td style="padding-left:9px;">
74 <input type="submit" value="[% l('Go') %]"
75 title="[% l('Go') %]" class="opac-button" />
77 <td style="padding-left:5px;">
79 alt="[% l('Holds Help') %]"
80 title="[% l('Actions for selected holds') %]"
81 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
83 <td style="padding-left:5px;" class='error'>
84 [% IF ctx.hold_suspend_post_capture;
85 l('One or more holds could not be suspended because the item is at (or en route to) the pickup library.');
90 [% IF CGI.param("available") -%]
91 <a href="[% mkurl('holds', {}, ['limit','offset','available']) %]">[% l('Show all holds') %]</a> |
92 <strong>[% l("Show only available holds") %]</strong>
94 <strong>[% l("Show all holds") %]</strong> |
95 <a href="[% mkurl('holds',{available => 1},['limit','offset']) %]">[% l("Show only available holds") %]</a>
100 [% IF ctx.holds.size < 1 %]
101 <div class="warning_box">[% l('No holds found.') %]</div>
103 <table id="acct_holds_main_header" title="[% l('Items on Hold') %]"
104 class="table_no_border_space table_no_cell_pad">
108 <input type="checkbox" title="[% l('Select All Holds') %]"
109 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;}"/>
111 <th>[% l('Title') %]</th>
112 <th>[% l('Author') %]</th>
113 <th>[% l('Format') %]</th>
114 <th>[% l('Pickup Location') %]</th>
115 <th>[% l('Activate') %]</th>
116 <th>[% l('Cancel if not filled by') %]</th>
117 <th>[% l('Active') %]</th>
118 <th>[% l('Status') %]</th>
119 <th>[% l('Notes') %]</th>
122 <tbody id="holds_temp_parent">
123 [% FOR hold IN ctx.holds;
124 attrs = {marc_xml => hold.marc_xml};
125 PROCESS get_marc_attrs args=attrs;
126 ahr = hold.hold.hold %]
127 <tr name="acct_holds_temp"
128 class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
129 <td align="center" style="text-align:center;">
130 <input type="checkbox" name="hold_id" value="[% ahr.id %]"
131 [% html_text_attr('title', l('Select hold [_1]', attrs.title)) %]/>
137 IF ahr.hold_type == 'P';
138 title = l('[_1] ([_2])', title, hold.hold.part.label);
141 <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% title | html %]</a>
146 <a href="[% mkurl(ctx.opac_root _ '/results',
147 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
148 ) %]">[% attrs.author | html %]</a>
152 <div class="format_icon">
153 [% IF attrs.format_icon %]
154 <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
159 [% ctx.get_aou(ahr.pickup_lib).name | html %]
162 [% IF ahr.frozen == 't' AND ahr.thaw_date;
163 date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
167 [% IF ahr.expire_time;
168 date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
172 [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
175 <div name="acct_holds_status">
176 [% PROCESS get_hold_status hold=hold; %]
179 <td class="hold_notes">
180 [%- FOREACH pubnote IN ahr.notes;
181 IF pubnote.pub == 't';
183 <div class="hold_note">
184 <span class="hold_note_title">[% pubnote.title | html %]</span>
186 <span class="hold_note_body">[% pubnote.body | html %]</span>
190 <td class="opac-auto-161">
191 <a href="[% mkurl(ctx.opac_root _ '/myopac/holds/edit', {id => ahr.id}) %]"
192 [% html_text_attr('title', l('Edit hold for item [_1]', attrs.title)) %]>