Bug 9761: Make it possible to confirm future hold requests at checkin time
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / pendingreserves.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <!-- Plugin datatables -->
6 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/JavaScript" language="JavaScript">
10 //<![CDATA[
11 $(document).ready(function() {
12   [% IF (dateformat == 'metric') %]
13       dt_add_type_uk_date();
14   [% END %]
15   var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
16   }));
17   holdst.fnAddFilters("filter");
18   [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
19   function separateData ( ColumnData ){
20     var cD = ColumnData;
21     var new_array = new Array();
22     for ( j=0 ; j<cD.length ; j++ ) {
23         var split_array = cD[j].split(/<br>/gi);
24         for ( k=0 ; k<split_array.length ; k++ ){
25             var check_array = $.inArray(split_array[k], new_array);
26             if (check_array == -1) {
27                 new_array.push(split_array[k]);
28             }
29         }
30     }
31     new_array.sort();
32     return new_array;
33   }
34   [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
35   function createSelect( data ) {
36       data = separateData(data);
37       var r='<select style="width:99%"><option value="">None</option>', i, len=data.length;
38       for ( i=0 ; i<len ; i++ ) {
39           r += '<option value="'+data[i]+'">'+data[i]+'</option>';
40       }
41       return r+'</select>';
42   }
43   $("#homebranchfilter").each( function () {
44       $(this).html( createSelect( holdst.fnGetColumnData(4) ) );
45       $('select', this).change( function () {
46           holdst.fnFilter( $(this).val(), 4 );
47       } );
48   } );
49   $("#itypefilter").each( function () {
50       $(this).html( createSelect( holdst.fnGetColumnData(8) ) );
51       $('select', this).change( function () {
52           holdst.fnFilter( $(this).val(), 8 );
53       } );
54   } );
55   $("#locationfilter").each( function () {
56       $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
57       $('select', this).change( function () {
58           holdst.fnFilter( $(this).val(), 9 );
59       } );
60   } );
61 });
62 //]]>
63 </script>
64 </head>
65 <body id="circ_pendingreserves" class="circ">
66 [% INCLUDE 'header.inc' %]
67 [% INCLUDE 'circ-search.inc' %]
68
69
70 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Holds to pull</div>
71
72 <div id="doc3" class="yui-t2">
73
74    <div id="bd">
75     <div id="yui-main">
76     <div class="yui-b">
77
78 <h2>Holds to pull[% IF ( run_report ) %] placed between [% from %] and [% to %][% END %]</h2>
79 [% IF ( run_report ) %]
80 <h3>Reported on [% todaysdate %]</h3>
81 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
82 <div class="searchresults">
83     [% IF ( reserveloop ) %]
84     <table id="holdst">
85     <thead>
86         <tr>
87         <th>Pull this many items</th>
88         <th>Items available</th>
89         <th>Patrons with holds</th>
90         <th>Title</th>
91         <th>Libraries</th>
92         <th>Available call numbers</th>
93         <th>Available copy No</th>
94         <th>Available enumeration</th>
95         <th>Available itypes</th>
96         <th>Available locations</th>
97         <th>Earliest hold date</th>
98         </tr>
99     </thead>
100     <tbody>
101         [% FOREACH reserveloo IN reserveloop %]
102         <tr>
103         [% IF ( reserveloo.borrowernumber ) %]
104             <td><p><b>[% reserveloo.pullcount %]</b></p></td>
105             <td>[% reserveloo.count %]</td>
106             <td>[% reserveloo.rcount %]</td>
107             <td>
108             <p>
109         [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
110                     [% reserveloo.title |html %]
111                 </a> [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
112             </p>
113             </td>
114         [% ELSE %]
115             <td>"</td>
116             <td>"</td>
117             <td>"</td>
118             <td>"</td>
119         [% END %]
120         <td>[% reserveloo.holdingbranch %]</td>
121         <td><p>[% reserveloo.itemcallnumber %]</p></td>
122         <td><p>[% reserveloo.copyno %]</p></td>
123         <td><p>[% reserveloo.enumchron %]</p></td>
124         <td>[% reserveloo.itype %]</td>
125         <td>[% reserveloo.location %]</td>
126         <td width="15%">
127             <p>[% reserveloo.reservedate %]</p>
128             <p>in [% reserveloo.branch %]</p>
129             [% IF ( reserveloo.statusw ) %]<p>Waiting</p>[% END %][% IF ( reserveloo.statusf ) %]<p>Fullfilled</p>[% END %]
130         </td>
131         </tr>
132         [% END %]
133     </tbody>
134     <tfoot>
135         <tr>
136         <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
137         <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
138         <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
139         <td><input type="text" class="filter" data-column_num="3" placeholder="Title" style="width:95%"/></td>
140         <td id="homebranchfilter"></td>
141         <td><input type="text" class="filter" data-column_num="5" placeholder="Call number" style="width:95%"/></td>
142         <td><input type="text" class="filter" data-column_num="6" placeholder="Available copy" style="width:95%"/></td>
143         <td><input type="text" class="filter" data-column_num="7" placeholder="Available enumeration" style="width:95%"/></td>
144         <td id="itypefilter"></td>
145         <td id="locationfilter"></td>
146         <td></td>
147         </tr>
148     </tfoot>
149     </table>
150     [% ELSE %]
151         <b>No items found.</b>
152     [% END %]
153 </div>
154 [% END %]
155
156 </div>
157 </div>
158 <div class="yui-b">
159 <div id="filters">
160
161 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
162 <fieldset class="brief">
163 <h4>Refine results</h4>
164 <ol>
165 <li>
166 <label for="from">
167     Start date:
168 </label>
169 <input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
170 </li>
171 <li><label for="to">
172     End date:
173 </label>
174 <input type="text" size="10" id="to" name="to" value="[% to %]" class="datepickerto" />
175 </li>
176 </ol>
177 <p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to [% IF ( HoldsToPullEndDate ) %][% HoldsToPullEndDate %] days ahead[% ELSE %]today[% END %], set other date ranges as needed. )</i></p>
178 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
179 </fieldset>
180 </form>
181
182 </div>
183 </div>
184 </div>
185 [% INCLUDE 'intranet-bottom.inc' %]