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