Bug 11605: fallback to default DataTables settings where possible
[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             "sPaginationType": "four_button"
36         }));
37      });
38 //]]>
39 </script>
40 <style type="text/css">
41     .sql { display: none; }
42     .ulined { text-decoration: underline; }
43     .ratiolimit { color: blue; cursor: pointer; }
44 </style>
45 </head>
46 <body id="circ_reserveratios" class="circ">
47 [% INCLUDE 'header.inc' %]
48 [% INCLUDE 'circ-search.inc' %]
49
50 <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>
51
52 <div id="doc3" class="yui-t2">
53    <div id="bd">
54     <div id="yui-main">
55     <div class="yui-b">
56 <h1>Hold ratios to calculate items needed</h1>
57    <h3>Calculated on [% todaysdate %]. From [% from %]
58     to [% to %]</h3>
59 <p>These items have a hold ratio &ge; [% ratio %].</p>
60 <div class="sql">[% sql %]</div>
61
62 [% IF ( reserveloop ) %]
63     <table id="holdst">
64       <thead>
65         <tr>
66           <th>Holds</th>
67           <th>Items</th>
68           <th>Hold ratio</th>
69           <th>Title</th>
70           <th>Holding libraries</th>
71           <th>Location</th>
72           <th>Itype</th>
73           <th>Call numbers</th>
74           <th>Items needed</th>
75         </tr>
76       </thead>
77       <tbody>
78       [% FOREACH reserveloo IN reserveloop %]
79         <tr>
80             <td><p>[% reserveloo.reservecount %]</p></td>
81             <td><p>[% reserveloo.itemcount %]</p></td>
82             <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
83             <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 %]
84             </td>
85             <td><p>[% reserveloo.listbranch %]</p></td>
86             <td><p>[% reserveloo.location %]</p></td>
87             <td><p>[% reserveloo.itype %]</p></td>
88             <td><p>[% reserveloo.listcall %]</p></td>
89             <td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p><b>[% reserveloo.ratiocalc %] to order</b></p>[% END %]</td>
90         </tr>
91       [% END %]
92       </tbody>
93     </table>
94     [% ELSE %]
95         <b>No items found.</b>
96     [% END %]
97 </div>
98 </div>
99 <div class="yui-b">
100 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
101 <fieldset class="brief">
102 <h4>Refine results:</h4>
103 <ol><li><label for="ratio">
104     Hold ratio:
105 </label>
106 <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /></li>
107 <li><label for="from">
108     Start date:
109 </label>
110 <input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
111 </li>
112 <li><label for="to">
113     End date:
114 </label>
115 <input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" />
116 </li></ol>
117 (inclusive)
118
119 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
120 </fieldset>
121 </form>
122
123 </div>
124 </div>
125 [% INCLUDE 'intranet-bottom.inc' %]