Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / reserveratios.tt
blob3c35d865da2d88d6ab5cc4d14ec0180df531cae2
1 [% USE Asset %]
2 [% USE KohaDates %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% USE ItemTypes %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") %]
11 <style type="text/css">
12     .sql { display: none; }
13     .ulined { text-decoration: underline; }
14     .ratiolimit { color: blue; cursor: pointer; }
15     #holdst ul li {  list-style: outside url("[% interface %]/[% theme %]/img/item-bullet.gif") disc; }
16 </style>
17 </head>
19 <body id="circ_reserveratios" class="circ">
20 [% INCLUDE 'header.inc' %]
21 [% INCLUDE 'circ-search.inc' %]
23 <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>
25 <div id="doc3" class="yui-t2">
26    <div id="bd">
27     <div id="yui-main">
28     <div class="yui-b">
29 <h1>Hold ratios to calculate items needed</h1>
30    <h3>Calculated on [% todaysdate | $KohaDates %]. From [% from | $KohaDates %]
31     to [% to | $KohaDates %]</h3>
32 <p>These items have a hold ratio &ge; [% ratio %].</p>
33 <div class="sql">[% sql %]</div>
35 [% IF ( reserveloop ) %]
36     <table id="holdst">
37       <thead>
38         <tr>
39           <th>Holds</th>
40           <th>Items</th>
41           <th>Hold ratio</th>
42           <th>Title</th>
43           <th>Home libraries</th>
44           <th>Holding libraries</th>
45           <th>Location</th>
46           <th>Itype</th>
47           <th>Call numbers</th>
48           <th>Items needed</th>
49         </tr>
50       </thead>
51       <tbody>
52       [% FOREACH reserveloo IN reserveloop %]
53         <tr>
54             <td><p>[% reserveloo.reservecount %]</p></td>
55             <td><p>[% reserveloo.itemcount %]</p></td>
56             <td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
57             <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 %]
58             </td>
59             <td>
60                   <ul>
61                       [% FOREACH homebranch IN reserveloo.homebranch_list %]
62                           <li>[% Branches.GetName ( homebranch ) %]</li>
63                       [% END %]
64                   </ul>
65             </td>
66             <td>
67                   <ul>
68                       [% FOREACH holdingbranch IN reserveloo.holdingbranch_list %]
69                           <li>[% Branches.GetName ( holdingbranch ) %]</li>
70                       [% END %]
71                   </ul>
72             </td>
73             <td>
74                   <ul>
75                       [% FOREACH location IN reserveloo.location %]
76                           <li>[% AuthorisedValues.GetByCode( 'LOC', location )%]</li>
77                       [% END %]
78                   </ul>
79             </td>
80             <td>
81                   <ul>
82                       [% FOREACH itype IN reserveloo.itype %]
83                           <li>[% ItemTypes.GetDescription( itype ) %]</li>
84                       [% END %]
85                   </ul>
86             </td>
87             <td>
88                   <ul>
89                       [% FOREACH listcall IN reserveloo.listcall %]
90                           <li>[% listcall %]</li>
91                       [% END %]
92                   </ul>
93             </td>
94             <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 %]
95             [% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders %] pending</b>[% END %]</p>[% END %]</td>
96         </tr>
97       [% END %]
98       </tbody>
99     </table>
100     [% ELSE %]
101         <b>No items found.</b>
102     [% END %]
103 </div>
104 </div>
105 <div class="yui-b">
106 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
107 <fieldset class="brief">
108 <h4>Refine results:</h4>
109 <ol>
110     <li>
111         <label for="ratio">Hold ratio:</label>
112         <input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" />
113     <li>
115     <li>
116         <label for="include_ordered">Included ordered:</label>
117         [% IF include_ordered %]
118             <input id="include_ordered" name="include_ordered" type="checkbox" checked="checked"/>
119         [% ELSE %]
120             <input id="include_ordered" name="include_ordered" type="checkbox"/>
121         [% END %]
122     <li>
124     <li>
125         <label for="from">Start date:</label>
126         <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
127     </li>
129     <li>
130         <label for="to">End date:</label>
131         <input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="datepickerto" />
132     </li>
133 </ol>
134 (inclusive)
136 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
137 </fieldset>
138 [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]
139 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
140 <input type="hidden" name="basketno" value="[% basketno %]" />
141 [% END %]
142 </form>
144 </div>
145 </div>
147 [% MACRO jsinclude BLOCK %]
148   [% INCLUDE 'calendar.inc' %]
149   [% INCLUDE 'datatables.inc' %]
150   <script type="text/javascript">
151        $(document).ready(function() {
152           $(".ratiolimit").click(function () {
153               $("#ratio").val($(this).html());
154           });
155           $(".ratiolimit").hover(
156               function () { $(this).toggleClass("ulined") },
157               function () { $(this).toggleClass("ulined") }
158           );
159           $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
160               "aaSorting": [ [2,'desc'], [3,'asc'] ],
161               "aoColumnDefs": [
162                   { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
163                   { "aTargets": [ 3 ], "sType": "anti-the" },
164               ],
165               "sPaginationType": "four_button"
166           }));
167        });
168   </script>
169 [% END %]
171 [% INCLUDE 'intranet-bottom.inc' %]