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