Bug 13299 - Add home library column to the holds 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 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript">
8 //<![CDATA[
9      $(document).ready(function() {
10         $(".ratiolimit").click(function () {
11             $("#ratio").val($(this).html());
12         });
13         $(".ratiolimit").hover(
14             function () { $(this).toggleClass("ulined") },
15             function () { $(this).toggleClass("ulined") }
16         );
17         $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
18             "aaSorting": [ [2,'desc'], [3,'asc'] ],
19             "aoColumnDefs": [
20                 { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
21                 { "aTargets": [ 3 ], "sType": "anti-the" },
22             ],
23             "sPaginationType": "four_button"
24         }));
25      });
26 //]]>
27 </script>
28 <style type="text/css">
29     .sql { display: none; }
30     .ulined { text-decoration: underline; }
31     .ratiolimit { color: blue; cursor: pointer; }
32 </style>
33 </head>
34 <body id="circ_reserveratios" class="circ">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'circ-search.inc' %]
37
38 <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>
39
40 <div id="doc3" class="yui-t2">
41    <div id="bd">
42     <div id="yui-main">
43     <div class="yui-b">
44 <h1>Hold ratios to calculate items needed</h1>
45    <h3>Calculated on [% todaysdate %]. From [% from %]
46     to [% to %]</h3>
47 <p>These items have a hold ratio &ge; [% ratio %].</p>
48 <div class="sql">[% sql %]</div>
49
50 [% IF ( reserveloop ) %]
51     <table id="holdst">
52       <thead>
53         <tr>
54           <th>Holds</th>
55           <th>Items</th>
56           <th>Hold ratio</th>
57           <th>Title</th>
58           <th>Home libraries</th>
59           <th>Holding libraries</th>
60           <th>Location</th>
61           <th>Itype</th>
62           <th>Call numbers</th>
63           <th>Items needed</th>
64         </tr>
65       </thead>
66       <tbody>
67       [% FOREACH reserveloo IN reserveloop %]
68         <tr>
69             <td><p>[% reserveloo.reservecount %]</p></td>
70             <td><p>[% reserveloo.itemcount %]</p></td>
71             <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
72             <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 %]
73             </td>
74             <td><p>[% reserveloo.homebranch_list %]</p></td>
75             <td><p>[% reserveloo.holdingbranch_list %]</p></td>
76             <td><p>[% reserveloo.location %]</p></td>
77             <td><p>[% reserveloo.itype %]</p></td>
78             <td><p>[% reserveloo.listcall %]</p></td>
79             <td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc %] --><a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;rr_quantity_to_order=[% reserveloo.ratiocalc %]">[% END %]<b>[% reserveloo.ratiocalc %] to order</b>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]</a>[% END %]
80             [% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders %] pending</b>[% END %]</p>[% END %]</td>
81         </tr>
82       [% END %]
83       </tbody>
84     </table>
85     [% ELSE %]
86         <b>No items found.</b>
87     [% END %]
88 </div>
89 </div>
90 <div class="yui-b">
91 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
92 <fieldset class="brief">
93 <h4>Refine results:</h4>
94 <ol>
95     <li>
96         <label for="ratio">Hold ratio:</label>
97         <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" />
98     <li>
99
100     <li>
101         <label for="include_ordered">Included ordered:</label>
102         [% IF include_ordered %]
103             <input id="include_ordered" name="include_ordered" type="checkbox" checked="checked"/>
104         [% ELSE %]
105             <input id="include_ordered" name="include_ordered" type="checkbox"/>
106         [% END %]
107     <li>
108
109     <li>
110         <label for="from">Start date:</label>
111         <input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
112     </li>
113
114     <li>
115         <label for="to">End date:</label>
116         <input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" />
117     </li>
118 </ol>
119 (inclusive)
120
121 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
122 </fieldset>
123 [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]
124 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
125 <input type="hidden" name="basketno" value="[% basketno %]" />
126 [% END %]
127 </form>
128
129 </div>
130 </div>
131 [% INCLUDE 'intranet-bottom.inc' %]