Bug 11756: improve default sorting on hold ratios report
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / reserveratios.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11      $(document).ready(function() {
12         $(".ratiolimit").click(function () {
13             $("#ratio").val($(this).html());
14         });
15         $(".ratiolimit").hover(
16             function () { $(this).toggleClass("ulined") },
17             function () { $(this).toggleClass("ulined") }
18         );
19         $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
20             "aaSorting": [ [0,'desc'], [3,'asc'] ],
21             "aoColumnDefs": [
22                 { "aTargets": [ 8 ], "sType": "natural" }
23             ],
24             "aoColumns": [
25                 null,
26                 null,
27                 null,
28                 { "sType": "anti-the" },
29                 null,
30                 null,
31                 null,
32                 null,
33                 null
34             ],
35             "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
36             "iDisplayLength": 20,
37             "sPaginationType": "four_button"
38         }));
39      });
40 //]]>
41 </script>
42 <style type="text/css">
43     .sql { display: none; }
44     .ulined { text-decoration: underline; }
45     .ratiolimit { color: blue; cursor: pointer; }
46 </style>
47 </head>
48 <body id="circ_reserveratios" class="circ">
49 [% INCLUDE 'header.inc' %]
50 [% INCLUDE 'circ-search.inc' %]
51
52 <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; Hold ratios</div>
53
54 <div id="doc3" class="yui-t2">
55    <div id="bd">
56     <div id="yui-main">
57     <div class="yui-b">
58 <h1>Hold ratios to calculate items needed</h1>
59    <h3>Calculated on [% todaysdate %]. From [% from %]
60     to [% to %]</h3>
61 <p>These items have a hold ratio &ge; [% ratio %].</p>
62 <div class="sql">[% sql %]</div>
63
64 [% IF ( reserveloop ) %]
65     <table id="holdst">
66       <thead>
67         <tr>
68           <th>Holds</th>
69           <th>Items</th>
70           <th>Hold ratio</th>
71           <th>Title</th>
72           <th>Holding libraries</th>
73           <th>Location</th>
74           <th>Itype</th>
75           <th>Call numbers</th>
76           <th>Items needed</th>
77         </tr>
78       </thead>
79       <tbody>
80       [% FOREACH reserveloo IN reserveloop %]
81         <tr>
82             <td><p>[% reserveloo.reservecount %]</p></td>
83             <td><p>[% reserveloo.itemcount %]</p></td>
84             <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
85             <td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title |html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author %][% END %]
86             </td>
87             <td><p>[% reserveloo.listbranch %]</p></td>
88             <td><p>[% reserveloo.location %]</p></td>
89             <td><p>[% reserveloo.itype %]</p></td>
90             <td><p>[% reserveloo.listcall %]</p></td>
91             <td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p><b>[% reserveloo.ratiocalc %] to order</b></p>[% END %]</td>
92         </tr>
93       [% END %]
94       </tbody>
95     </table>
96     [% ELSE %]
97         <b>No items found.</b>
98     [% END %]
99 </div>
100 </div>
101 <div class="yui-b">
102 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
103 <fieldset class="brief">
104 <h4>Refine results:</h4>
105 <ol><li><label for="ratio">
106     Hold ratio:
107 </label>
108 <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /></li>
109 <li><label for="from">
110     Start date:
111 </label>
112 <input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
113 </li>
114 <li><label for="to">
115     End date:
116 </label>
117 <input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" />
118 </li></ol>
119 (inclusive)
120
121 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
122 </fieldset>
123 </form>
124
125 </div>
126 </div>
127 [% INCLUDE 'intranet-bottom.inc' %]