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