Merge branch 'bug_9604' into 3.12-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / overdue.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
6  //<![CDATA[
7      function clone_parent(node) {
8         var parent = node.parentNode;
9         var clone = parent.cloneNode(true);
10         parent.parentNode.insertBefore(clone, parent.nextSibling);
11         $("a", clone).attr("style", "visibility: visible");
12         $("input", clone).attr("value", "");
13
14
15         var theid = $("span", clone).attr("id") || "";
16         var theid = $("span", clone).attr("id") || "";
17         var parts = theid.match(/^pattrodue-getready-(.*)$/);
18         if (parts && parts.length > 1)
19         {
20             var appendid = "-" + Math.floor(Math.random()*1000+1);
21             $("span", clone).attr("id",theid+appendid);
22
23             theid = $("input", clone).attr("id");
24             $("input", clone).attr("id",theid+appendid);
25
26             theid = $("div[id]", clone).attr("id");
27             $("div[id]", clone).attr("id",theid+appendid);
28
29             var attrcode = $("script", clone).attr("x-code");
30             var newsuffix = parts[1] + appendid;
31             create_auto_completion_responder(newsuffix,attrcode);
32         }
33
34     }
35
36
37     function delete_parent(node) {
38         var parent = node.parentNode;
39         parent.parentNode.removeChild(parent);
40     }
41
42     function create_auto_completion_responder(uniqueid,attrcode) {
43        $("#pattrodue-getready-" + uniqueid).ready(function(){
44             $( "#pattrodue-input-" + uniqueid ).autocomplete({
45                 source: "/cgi-bin/koha/circ/ypattrodue-attr-search-authvalue.pl/"+attrcode,
46                 select: function( event, ui ) {
47                     $( "#pattrodue-input-"+uniqueid ).val( ui.item.description );
48                     return false;
49                 }
50             })
51             .data( "autocomplete" )._renderItem = function( ul, item ) {
52                 return $( "<li></li>" )
53                 .data( "item.autocomplete", item )
54                 .append( "<a>" + item.description + " (" + item.authorised_value + ")</a>" )
55                 .appendTo( ul )
56                 .css("font-size","90%").css("width","13em");
57             };
58         });
59     }
60 //]]>
61 </script>
62 <style type="text/css">
63     .sql {display:none;}
64 </style>
65 </head>
66 <body id="circ_overdue" class="circ">
67 [% INCLUDE 'header.inc' %]
68 [% INCLUDE 'circ-search.inc' %]
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; Overdues as of [% todaysdate %]</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 [% IF ( noreport ) %]
79
80 <h2>Overdue report</h2>
81
82 <p>Please choose one or more filters to proceed.</p>
83
84 [% ELSE %]
85
86 <h2>[% nnoverdue %] [% IF ( noverdue_is_plural ) %]Items[% ELSE %]Item[% END %]
87 overdue as of [% todaysdate %][% IF ( isfiltered ) %] <span style="font-size:70%;">(Filtered. <a href="/cgi-bin/koha/circ/overdue.pl">Reset filter</a>)</span>[% END %]</h2>
88
89 <p>
90     [% IF ( isfiltered ) %]
91       <a href="overdue.pl?op=csv&amp;[% csv_param_string |html %]">Download file of displayed overdues</a>
92     [% ELSE %]
93       <a href="overdue.pl?op=csv">Download file of all overdues</a>
94     [% END %]
95 </p>
96 <div class="sql"><pre>[% sql |html %]</pre></div>
97 <div class="searchresults">
98 <table id="overduest">
99 <thead><tr>
100     <th>Due date</th>
101     <th>Patron</th>
102     <th>Library</th>
103     <th>Title</th>
104     <th>Barcode</th>
105     <th>Call number</th>
106 </tr></thead>
107
108 <tbody>[% FOREACH overdueloo IN overdueloop %]
109     <tr>
110         <td>[% overdueloo.duedate %]</td>
111         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overdueloo.borrowernumber %]">[% overdueloo.surname %] [% overdueloo.firstname %]</a>
112         [% IF ( overdueloo.email ) %][<a href="mailto:[% overdueloo.email %]?subject=Overdue: [% overdueloo.title |html %]">email</a>][% END %]
113         [% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %]</td>
114         <td>[% overdueloo.branchcode %]</td>
115         <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overdueloo.biblionumber %][% overdueloo.title |html %]  [% overdueloo.subtitle %]</a> [% IF ( overdueloo.author ) %], by [% overdueloo.author %][% END %][% IF ( overdueloo.enumchron ) %], [% overdueloo.enumchron %][% END %]
116         </td>
117                 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% overdueloo.biblionumber %]&amp;itemnumber=[% overdueloo.itemnum %]#item[% overdueloo.itemnum %]">[% overdueloo.barcode %]</a></td>
118                 <td>[% overdueloo.itemcallnumber %]</td>
119         </tr>
120 [% END %]</tbody>
121 </table>
122
123 </div>
124 [% END %]  <!-- noreport -->
125
126 </div>
127 </div>
128 <div class="yui-b">
129 <form method="post" action="/cgi-bin/koha/circ/overdue.pl">
130   <fieldset class="brief">
131 <h4>Filter on:</h4>
132         <fieldset><legend>Date due:</legend>
133         <ol>
134     <li><label for="from">From:</label>
135     <input type="text" id="from" name="dateduefrom" size="10" value="[% dateduefrom %]" class="datepickerfrom" />
136         </li>
137         <li>
138     <label for="to">To:</label>
139     <input type="text" id="to" name="datedueto" size="10" value="[% datedueto %]" class="datepickerto" />
140     </li>
141     </ol></fieldset>
142     <ol>
143     <li><label>Name or cardnumber:</label><input type="text" name="borname" value="[% borname |html %]" /></li>
144     <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option>
145       [% FOREACH borcatloo IN borcatloop %]
146         [% IF ( borcatloo.selected ) %]<option value="[% borcatloo.value |html %]" selected="selected">[% borcatloo.catname %]</option>[% ELSE %]<option value="[% borcatloo.value |html %]">[% borcatloo.catname %]</option>[% END %]
147       [% END %]
148       </select>
149     </li>
150     <li><label>Patron flags:</label>
151         <select name="borflag" size="1" id="borflag">
152             <option value="">None</option>
153             [% IF ( borflag_gonenoaddress ) %]<option value="gonenoaddress" selected="selected">Address in question</option>
154             [% ELSE %]<option value="gonenoaddress">Address in question</option>[% END %]
155             [% IF ( borflag_debarred ) %]<option value="debarred" selected="selected">Restricted</option>
156             [% ELSE %]<option value="debarred">Restricted</option>[% END %]
157             [% IF ( borflag_lost ) %]<option value="lost" selected="selected">Lost card</option>
158             [% ELSE %]<option value="lost">Lost card</option>[% END %]
159         </select>
160     </li>
161         [% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %]
162                 <!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->
163                 <li>
164                         <label>[% patron_attr_filter_loo.description %]:</label>
165             [% IF ( patron_attr_filter_loo.authorised_value_category ) %]
166                 <script type="text/javascript" x-code="[% patron_attr_filter_loo.code |html %]">create_auto_completion_responder([% patron_attr_filter_loo.domid %],"[% patron_attr_filter_loo.code |html %]");</script>
167                                 <span id="pattrodue-getready-[% patron_attr_filter_loo.domid %]">
168                                                 <div class="pattrodue-autocomplete">
169                                                         <input autocomplete="off" id="pattrodue-input-[% patron_attr_filter_loo.domid %]" name="patron_attr_filter_[% patron_attr_filter_loo.code |html %]" value="[% patron_attr_filter_loo.cgivalue |html %]"  class="pattrodue-input" type="text" />
170                                                 </div>
171                                 </span>
172                         [% ELSE %]
173                                 <input type="text" name="patron_attr_filter_[% patron_attr_filter_loo.code |html %]" value="[% patron_attr_filter_loo.cgivalue |html %]"/>
174                         [% END %]
175                         [% IF ( patron_attr_filter_loo.repeatable ) %]
176                 <a href="#" onclick="clone_parent(this); return false;">Add</a>
177                 [% IF ( patron_attr_filter_loo.isclone ) %]
178                                     <a href="#" onclick="delete_parent(this); return false;" style="visibility: visible">Delete</a>
179                 [% ELSIF ( patron_attr_filter_loo.ismany ) %]
180                                     <a href="#" onclick="delete_parent(this); return false;" style="visibility: visible">Delete</a>
181                 [% ELSE %]
182                                     <a href="#" onclick="delete_parent(this); return false;" style="visibility: hidden">Delete</a>
183                 [% END %]
184                         [% END %]
185                 </li>
186         [% END %]
187
188     <li><label>Item type:</label><select name="itemtype" id="itemtype"><option value="">Any</option>
189       [% FOREACH itemtypeloo IN itemtypeloop %][% IF ( itemtypeloo.selected ) %]
190         <option value="[% itemtypeloo.value |html %]" selected="selected">[% itemtypeloo.itemtypename %]</option>[% ELSE %]
191         <option value="[% itemtypeloo.value |html %]">[% itemtypeloo.itemtypename %]</option>[% END %]
192       [% END %]
193       </select>
194     </li>
195
196     <li>
197         <label>Item home library:</label>
198         <select name="homebranch" id="homebranch">
199             <option value="">Any</option>
200             [% FOREACH homebranchloo IN homebranchloop %][% IF ( homebranchloo.selected ) %]
201             <option value="[% homebranchloo.value |html %]" selected="selected">[% homebranchloo.branchname %]</option>[% ELSE %]
202             <option value="[% homebranchloo.value |html %]">[% homebranchloo.branchname %]</option>[% END %]
203             [% END %]
204         </select>
205     </li>
206
207     <li>
208         <label>Item holding library:</label>
209             <select name="holdingbranch" id="holdingbranch">
210             <option value="">Any</option>
211             [% FOREACH holdingbranchloo IN holdingbranchloop %][% IF ( holdingbranchloo.selected ) %]
212             <option value="[% holdingbranchloo.value |html %]" selected="selected">[% holdingbranchloo.branchname %]</option>[% ELSE %]
213             <option value="[% holdingbranchloo.value |html %]">[% holdingbranchloo.branchname %]</option>[% END %]
214             [% END %]
215         </select>
216     </li>
217
218     <li>
219     <label>Library of the patron:</label><select name="branch" id="branch">
220         <option value="">Any</option>
221       [% FOREACH branchloo IN branchloop %]
222         [% IF ( branchloo.selected ) %]
223         <option value="[% branchloo.value |html %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]
224         <option value="[% branchloo.value |html %]">[% branchloo.branchname %]</option>[% END %]
225       [% END %]
226       </select>
227     </li>
228
229     <li><label for="order">Sort by:</label> <select name="order" id="order">
230 [% FOREACH ORDER_LOO IN ORDER_LOOP %]
231     [% IF ( ORDER_LOO.selected ) %]
232     <option value="[% ORDER_LOO.ordervalue %]" selected="selected">
233     [% ELSE %]
234     <option value="[% ORDER_LOO.ordervalue %]">
235     [% END %]
236     [% IF ( ORDER_LOO.order_date_due ) %]Due date
237     [% ELSIF ( ORDER_LOO.order_borrower ) %]Patron
238     [% ELSIF ( ORDER_LOO.order_barcode ) %]Barcode
239     [% ELSIF ( ORDER_LOO.order_title ) %]Title
240     [% ELSIF ( ORDER_LOO.order_date_due_desc ) %]Due date desc
241     [% ELSIF ( ORDER_LOO.order_borrower_desc ) %]Patron desc
242     [% ELSIF ( ORDER_LOO.order_barcode_desc ) %]Barcode desc
243     [% ELSIF ( ORDER_LOO.order_title_desc ) %]Title desc
244     [% ELSE %][% ORDER_LOO.label %]
245         [% IF ( ORDER_LOO.desc ) %]desc[% END %]
246     [% END %]
247     </option>
248 [% END %]
249         [% FOREACH patron_attr_order_loo IN patron_attr_order_loop %]
250         [% IF ( patron_attr_order_loo.selected ) %]<option value="[% patron_attr_order_loo.value |html %]" selected="selected">[% patron_attr_order_loo.label %]</option>
251         [% ELSE %]<option value="[% patron_attr_order_loo.value |html %]">[% patron_attr_order_loo.label %]</option>[% END %]
252         [% END %]
253 </select></li>
254
255 <li class="radio"><label for="showall">Show any items currently checked out:</label>
256         [% IF ( showall ) %]
257             <input type="checkbox" id="showall" name="showall" value="show" checked="checked" />
258     [% ELSE %]
259         <input type="checkbox" id="showall" name="showall" value="show" />
260     [% END %]
261 </li>
262 </ol>
263    <fieldset class="action">
264       <input type="submit" value="Apply filter" class="submit" />
265       <input type="hidden" name="op" value="apply filter" />
266    </fieldset>
267    </fieldset>
268   </form>
269 </div>
270 </div>
271
272 [% INCLUDE 'intranet-bottom.inc' %]