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