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 <div id='myopac_holds_div'>
12 <div id="acct_holds_tabs">
13 <div class="align selected">
14 <a href='#'>[% l("Items on Hold") %]</a>
17 <a href='[% mkurl('hold_history', {}, ['limit','offset','available']) %]'>[% l("Holds History") %]</a>
21 <div class="header_middle">
22 <span id="acct_holds_header" style="float:left;">
23 [% IF CGI.param("available");
24 l("Items Ready for Pickup");
26 l("Current Items on Hold");
30 <span class='float-left' style='padding-left: 10px;'>
31 <a href='[% mkurl('holds', {limit => limit,offset => (offset - limit)}) %]'
32 [% IF offset <= 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
33 [% IF offset > 0 || count > limit;
35 WHILE curpage * limit < count;
36 IF curpage * limit == offset;
40 <a href='[% mkurl('holds', {limit => limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %]</a>
42 curpage = curpage + 1;
45 <a href='[% mkurl('holds', {limit => limit, offset => (offset + limit)}) %]'
46 [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
49 <span style="float:right;">
50 <a class="hide_me" href="#">[% l('Export List') %]</a>
53 <div class="clear-both"></div>
56 <table cellpadding='0' cellspacing='0' class="opac-auto-097">
59 <select name="action" id="acct_holds_actions">
60 <option id='myopac_holds_actions_none' value=''>
61 -- [% l("Actions for selected holds") %] --
63 <option value='suspend'>[% l("Suspend") %]</option>
64 <option value='activate'>[% l("Activate") %]</option>
65 <!-- XXX maybe later <option value='thaw_date'>[% l("Set Active Date") %]</option> -->
66 <option value='cancel'>[% l("Cancel") %]</option>
69 <td width="1" style="padding-left:9px;">
70 <input type="submit" value="[% l('Go') %]"
71 alt="[% l('Go') %]" title="[% l('Go') %]"
72 class="opac-button" />
74 <td width="1" style="padding-left:5px;">
76 alt="[% l('Holds Help') %]"
77 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
79 <td style="padding-left:5px;" class='error'>
80 [% IF ctx.hold_suspend_post_capture;
81 l('One or more holds could not be suspended because the item is at (or en route to) the pickup library.');
86 [% IF CGI.param("available") %]
87 <a href="[% mkurl('holds', {}, ['limit','offset','available']) %]">[% l('Show all') %]</a> |
88 <strong>[% l("Show only available") %]</strong>
90 <strong>[% l("Show all") %]</strong> |
91 <a href="[% mkurl('holds',{available => 1},['limit','offset']) %]">[% l("Show only available") %]</a>
92 [% END %]
94 <select class="hide_me" id="holds_sort">
95 <option value="">[% l('-- Sort By --') %]</option>
96 <option value="title">[% l('Title') %]</option>
97 <option value="pickup">[% l('PickUp Location') %]</option>
98 <option value="status">[% l('Status') %]</option>
103 [% IF ctx.holds.size < 1 %]
104 <div class="warning_box">[% l('No holds found.') %]</div>
106 <div class="hide_me">
107 <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel" class="hide_me"></select>
109 <table id="acct_holds_main_header" cellpadding='0' cellspacing='0' border='0'>
113 <input type="checkbox" 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;}"/>
115 <th>[% l('Title') %]</th>
116 <th>[% l('Author') %]</th>
117 <th>[% l('Format') %]</th>
118 <th>[% l('Pickup Location') %]</th>
119 <th>[% l('Activate') %]</th>
120 <th>[% l('Cancel if not filled by') %]</th>
121 <th>[% l('Active') %]</th>
122 <th>[% l('Status') %]</th>
125 <tbody id="holds_temp_parent">
126 [% FOR hold IN ctx.holds;
127 attrs = {marc_xml => hold.marc_xml};
128 PROCESS get_marc_attrs args=attrs;
129 ahr = hold.hold.hold %]
130 <tr id="acct_holds_temp" name="acct_holds_temp"
131 class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
132 <td align="center" style="text-align:center;">
133 <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
139 IF ahr.hold_type == 'P';
140 title = l('[_1] ([_2])', title, hold.hold.part.label);
143 <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% title | html %]</a>
148 <a href="[% mkurl(ctx.opac_root _ '/results',
149 {qtype => 'author', query => attrs.author.replace('[,\.:;]', '')}
150 ) %]">[% attrs.author | html %]</a>
154 <div class="format_icon">
155 [% IF attrs.format_icon %]
156 <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
161 [% ctx.get_aou(ahr.pickup_lib).name | html %]
164 [% IF ahr.frozen == 't' AND ahr.thaw_date;
165 date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
169 [% IF ahr.expire_time;
170 date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
174 [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
177 <div name="acct_holds_status">
178 [% PROCESS get_hold_status hold=hold; %]
181 <td class="opac-auto-161">
182 <a href="[% mkurl(ctx.opac_root _ '/myopac/holds/edit', {id => ahr.id}) %]">Edit</a>