4 [% USE ColumnsSettings %]
5 [% USE AuthorisedValues %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Circulation › Holds to pull</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% Asset.css("css/datatables.css") %]
15 <body id="circ_pendingreserves" class="circ">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'circ-search.inc' %]
20 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › Holds to pull</div>
22 <div id="doc3" class="yui-t2">
27 [% FOR m IN messages %]
28 <div class="dialog [% m.type %]">
30 [% CASE 'letter_enqueued' %]
31 <span>The notice has been correctly enqueued.</span>
32 [% CASE 'no_email_address' %]
33 <span>The patron does not have an email address defined.</span>
34 [% CASE 'no_template_notice' %]
35 <span>There is no notice template with a code 'CANCEL_HOLD_ON_LOST' defined in your system.</span>
36 [% CASE 'hold_cancelled' %]
37 <span>The hold has been correctly cancelled.</span>
38 [% CASE 'hold_placed_at_biblio_level' %]
39 <span>The hold has been placed at biblio level. It is not possible to mark it as lost.</span>
46 <h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
47 <h3>Reported on [% todaysdate | $KohaDates %]</h3>
48 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
49 <div class="searchresults">
50 [% IF ( reserveloop ) %]
54 <th>Pull this many items</th>
55 <th>Items available</th>
56 <th>Patrons with holds</th>
58 <th class="anti-the">Title</th>
59 <th class="string-sort">Libraries</th>
60 <th>Available call numbers</th>
61 <th>Available copy numbers</th>
62 <th>Available enumeration</th>
63 <th class="string-sort">Available itypes</th>
64 <th class="string-sort">Available locations</th>
65 <th class="title-string">Earliest hold date</th>
70 [% FOREACH reserveloo IN reserveloop %]
72 [% IF ( reserveloo.borrowernumber ) %]
73 <td><p><b>[% reserveloo.pullcount %]</b></p></td>
74 <td>[% reserveloo.count %]</td>
75 <td>[% reserveloo.rcount %]</td>
76 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber %]">[% reserveloo.firstname %] [%reserveloo.surname %]</a></td>
79 [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
80 [% reserveloo.title |html %] [% FOREACH s IN reserveloo.subtitle %] [% s %][% END %]</a></p>
81 [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
91 [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
92 [% Branches.GetName ( holdingbranch ) %]<br>
95 <td><p>[% reserveloo.itemcallnumber %]</p></td>
96 <td><p>[% reserveloo.copyno %]</p></td>
97 <td><p>[% reserveloo.enumchron %]</p></td>
99 [% FOREACH itype IN reserveloo.itypes %]
100 [% ItemTypes.GetDescription( itype ) %]
104 [% FOREACH loc IN reserveloo.locations %]
105 [% AuthorisedValues.GetByCode('LOC', loc) %]<br>
109 <span title="[% reserveloo.reservedate %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) %]</span>
112 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
113 <input type="hidden" name="op" value="cancel_reserve" />
114 <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
115 [% IF reserveloo.holdingbranch != reserveloo.homebranch %]
116 <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) %]" />
118 <input type="submit" value="Cancel hold" />
122 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
123 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
124 <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
125 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
126 <input type="hidden" name="op" value="mark_as_lost" />
127 <input type="submit" value="Mark item as lost" />
128 [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
129 <input type="hidden" name="op" value="mark_as_lost_and_notify" />
130 <input type="submit" value="Mark item as lost and notify the patron" />
139 <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
140 <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
141 <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
142 <td><input type="text" class="filter" data-column_num="3" placeholder="Patron name" style="width:95%"/></td>
143 <td><input type="text" class="filter" data-column_num="4" placeholder="Title" style="width:95%"/></td>
144 <td id="homebranchfilter"></td>
145 <td><input type="text" class="filter" data-column_num="6" placeholder="Call number" style="width:95%"/></td>
146 <td><input type="text" class="filter" data-column_num="7" placeholder="Available copy" style="width:95%"/></td>
147 <td><input type="text" class="filter" data-column_num="8" placeholder="Available enumeration" style="width:95%"/></td>
148 <td id="itypefilter"></td>
149 <td id="locationfilter"></td>
156 <b>No items found.</b>
165 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
166 <fieldset class="brief">
167 <h4>Refine results</h4>
173 <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
178 <input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="datepickerto" />
182 [% IF ( HoldsToPullEndDate ) %]
183 <p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to [% HoldsToPullEndDate %] days ahead. Set other date ranges as needed.)</i></p>
185 <p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to today. Set other date ranges as needed.)</i></p>
188 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
196 [% MACRO jsinclude BLOCK %]
197 [% INCLUDE 'calendar.inc' %]
198 [% INCLUDE 'datatables.inc' %]
199 [% INCLUDE 'columns_settings.inc' %]
200 <script type="text/javascript">
201 $(document).ready(function() {
202 var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %];
203 var holdst = KohaTable("holdst", {
205 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
206 { "sType": "title-string", "aTargets" : [ "title-string" ] },
207 { "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus.
209 "sPaginationType": "full_numbers"
210 }, columns_settings);
211 holdst.fnAddFilters("filter");
212 [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
213 function separateData ( ColumnData ){
215 var new_array = new Array();
216 for ( j=0 ; j<cD.length ; j++ ) {
217 var split_array = cD[j].split(/<br>/gi);
218 for ( k=0 ; k<split_array.length ; k++ ){
219 var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
220 if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
228 [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
229 function createSelect( data ) {
230 data = separateData(data);
231 var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
232 for ( i=0 ; i<len ; i++ ) {
233 r += '<option value="'+data[i]+'">'+data[i]+'</option>';
235 return r+'</select>';
237 $("#homebranchfilter").each( function () {
238 $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
239 $('select', this).change( function () {
240 var filter_value = $(this).val();
241 holdst.fnFilter( filter_value, 5, true );
244 $("#itypefilter").each( function () {
245 $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
246 $('select', this).change( function () {
247 holdst.fnFilter( $(this).val(), 9 );
250 $("#locationfilter").each( function () {
251 $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
252 $('select', this).change( function () {
253 holdst.fnFilter( $(this).val(), 10 );
260 [% INCLUDE 'intranet-bottom.inc' %]