Merge remote-tracking branch 'origin/new/bug_7955'
[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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script type="text/javascript">
7 //<![CDATA[
8 $.tablesorter.addParser({
9     id: 'articles', 
10     is: function(s) {return false;  }, 
11     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
12     type: 'text' 
13 });
14          $(document).ready(function() {
15                 $("th a").hide();
16                 $(".ratiolimit").click(function () {
17             $("#ratio").val($(this).html());
18         });
19                 $(".ratiolimit").hover(
20             function () { $(this).toggleClass("ulined") },
21             function () { $(this).toggleClass("ulined") }
22         );
23                 $.tablesorter.defaults.widgets = ['zebra']; 
24                 $("#holdst:has(tbody tr)").tablesorter({    // only add sort if the table has a body and rows
25                         sortList: [[0,1]],
26                         headers: { 1: { sorter: 'articles' }}
27         });
28          });
29 //]]>
30 </script>
31 <style type="text/css">
32     .sql { display: none; }
33     .ulined { text-decoration: underline; }
34     .ratiolimit { color: blue; cursor: pointer; }
35 </style>
36 </head>
37 <body id="circ_reserveratios" class="circ">
38 [% INCLUDE 'header.inc' %]
39 [% INCLUDE 'circ-search.inc' %]
40
41 <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>
42
43 <div id="doc3" class="yui-t2">
44    
45    <div id="bd">
46         <div id="yui-main">
47         <div class="yui-b">
48 <h1>Hold ratios to calculate items needed</h1>
49    <h3>Calculated on [% todaysdate %]. From [% from %]
50         to [% to %]</h3>
51 <p>These items have a hold ratio &ge; [% ratio %].</p>
52 <div class="sql">[% sql %]</div>
53
54 [% IF ( reserveloop ) %]
55     <table id="holdst">
56 <thead>    <tr>
57         <th>Holds
58         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=reservecount&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
59         </th>
60         <th>Items
61         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=itemcount&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
62         </th>
63         <th>Hold ratio</th>
64         <th>Title
65         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=biblio&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
66         </th>
67         <th>Holding libraries
68         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=branch&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
69         </th>
70         <th>Location
71         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=location&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
72         </th>
73         <th>Itype
74         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=itype&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
75         </th>
76         <th>Call numbers
77         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=callnumber&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
78         </th>
79         <th>Items needed
80         </th>
81     </tr></thead>
82     
83     <tbody>[% FOREACH reserveloo IN reserveloop %]
84         <tr>
85                 <td><p>[% reserveloo.reservecount %]</p></td>
86                 <td><p>[% reserveloo.itemcount %]</p></td>
87                 <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
88             <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 %]
89             </td>
90             <td><p>[% reserveloo.listbranch %]</p></td>
91             <td><p>[% reserveloo.location %]</p></td>
92             <td><p>[% reserveloo.itype %]</p></td>
93             <td><p>[% reserveloo.listcall %]</p></td>
94             <td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p><b>[% reserveloo.ratiocalc %] to order</b></p>[% END %]</td>
95         </tr>
96     [% END %]</tbody>
97     </table>
98     [% ELSE %]
99         <b>No items found.</b>
100     [% END %]
101 </div>
102 </div>
103 <div class="yui-b">
104 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
105 <fieldset class="brief">
106 <h4>Refine results:</h4>
107 <ol><li><label for="ratio">
108     Hold ratio:
109 </label>
110 <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /></li>
111 <li><label for="from">
112     Start date:
113 </label>
114 <input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
115 </li>
116 <li><label for="to">
117     End date:
118 </label>
119 <input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" />
120 </li></ol>
121 (inclusive)
122
123 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
124 </fieldset>
125 </form>
126
127 </div>
128 </div>
129 [% INCLUDE 'intranet-bottom.inc' %]