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