5 [% USE ColumnsSettings %]
6 [% USE AuthorisedValues %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Circulation › Holds to pull</title>
12 [% INCLUDE 'doc-head-close.inc' %]
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 class="main container-fluid">
24 <div class="col-sm-10 col-sm-push-2">
27 [% FOR m IN messages %]
28 <div class="dialog [% m.type | html %]">
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 on biblio level. It is not possible to determine the item to mark 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 id="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 item types</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 | html %]</b></p></td>
74 <td>[% reserveloo.count | html %]</td>
75 <td>[% reserveloo.rcount | html %]</td>
76 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber | uri %]">[% reserveloo.firstname | html %] [% reserveloo.surname | html %]</a></td>
79 [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
80 [% reserveloo.title | html %] [% FOREACH s IN reserveloo.subtitle %] [% s | html %][% END %] [% reserveloo.part_number | html %] [% reserveloo.part_name | html %]</a></p>
81 [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
91 [% IF ( reserveloo.holdingbranches ) %]
93 [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
95 [% Branches.GetName ( holdingbranch ) | html %]
102 [% IF ( reserveloo.itemcallnumber ) %]
104 [% FOREACH itemcallnumber IN reserveloo.itemcallnumber %]
106 [% itemcallnumber | html %]
113 [% IF ( reserveloo.copyno ) %]
115 [% FOREACH copyno IN reserveloo.copyno %]
124 [% IF ( reserveloo.enumchron ) %]
126 [% FOREACH enumchron IN reserveloo.enumchron %]
128 [% enumchron | html %]
135 [% FOREACH itemType IN reserveloo.itemTypes %]
136 [% ItemTypes.GetDescription( itemType ) | html %]
140 [% FOREACH loc IN reserveloo.locations %]
141 [% AuthorisedValues.GetByCode('LOC', loc) | html %]
145 <span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) | html %]</span>
148 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
149 <input type="hidden" name="op" value="cancel_reserve" />
150 <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
151 [% IF reserveloo.holdingbranch != reserveloo.homebranch %]
152 <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" />
154 <input type="submit" value="Cancel hold" />
158 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
159 [% IF reserveloo.itemnumber %]
160 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
161 <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
162 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
163 <input type="hidden" name="op" value="mark_as_lost" />
164 <input type="submit" value="Mark item as lost" />
165 [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
166 <input type="hidden" name="op" value="mark_as_lost_and_notify" />
167 <input type="submit" value="Mark lost and notify patron" />
171 <span>Biblio level hold.</span>
180 <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
181 <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
182 <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
183 <td><input type="text" class="filter" data-column_num="3" placeholder="Patron name" style="width:95%"/></td>
184 <td><input type="text" class="filter" data-column_num="4" placeholder="Title" style="width:95%"/></td>
185 <td id="homebranchfilter"></td>
186 <td><input type="text" class="filter" data-column_num="6" placeholder="Call number" style="width:95%"/></td>
187 <td><input type="text" class="filter" data-column_num="7" placeholder="Available copy" style="width:95%"/></td>
188 <td><input type="text" class="filter" data-column_num="8" placeholder="Available enumeration" style="width:95%"/></td>
189 <td id="itemtype-filter"></td>
190 <td id="locationfilter"></td>
197 <b>No items found.</b>
203 </div> <!-- /.col-sm-10.col-sm-push-2 -->
205 <div class="col-sm-2 col-sm-pull-10">
210 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
211 <fieldset class="brief">
212 <h4>Refine results</h4>
218 <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
223 <input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="datepickerto" />
227 [% IF ( HoldsToPullEndDate ) %]
228 <p><i>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to [% HoldsToPullEndDate | html %] days ahead. Set other date ranges as needed.)</i></p>
230 <p><i>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to today. Set other date ranges as needed.)</i></p>
233 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
239 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
240 </div> <!-- /.row -->
242 [% MACRO jsinclude BLOCK %]
243 [% INCLUDE 'calendar.inc' %]
244 [% INCLUDE 'datatables.inc' %]
245 [% INCLUDE 'columns_settings.inc' %]
247 $(document).ready(function() {
248 var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
249 var holdst = KohaTable("holdst", {
251 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
252 { "sType": "title-string", "aTargets" : [ "title-string" ] },
253 { "sType": "string", "aTargets": [ "string-sort" ] }
255 "sPaginationType": "full_numbers"
256 }, columns_settings);
257 holdst.fnAddFilters("filter");
258 [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
259 function separateData ( ColumnData ){
261 var new_array = new Array();
262 for ( j=0 ; j<cD.length ; j++ ) {
263 var split_array = cD[j].split(/\n/gi);
264 for ( k=0 ; k<split_array.length ; k++ ){
265 var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
266 if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
274 [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
275 function createSelect( data ) {
276 data = separateData(data);
277 var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
278 for ( i=0 ; i<len ; i++ ) {
279 r += '<option value="'+data[i]+'">'+data[i]+'</option>';
281 return r+'</select>';
283 $("#homebranchfilter").each( function () {
284 $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
285 $('select', this).change( function () {
286 var filter_value = $(this).val();
287 holdst.fnFilter( filter_value, 5, true );
290 $("#itemtype-filter").each( function () {
291 $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
292 $('select', this).change( function () {
293 holdst.fnFilter( $(this).val(), 9 );
296 $("#locationfilter").each( function () {
297 $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
298 $('select', this).change( function () {
299 holdst.fnFilter( $(this).val(), 10 );
306 [% INCLUDE 'intranet-bottom.inc' %]