Bug 25054: (QA follow-up) Add space after comma for multiple aliases
[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 [% USE TablesSettings %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 <style>
13     .sql { display: none; }
14     .ulined { text-decoration: underline; }
15     .ratiolimit:link { color: blue; cursor: pointer; }
16     .ratiolimit:hover { color: blue; text-decoration: underline; }
17     #holdst ul li {  list-style: outside url("[% interface | html %]/[% theme | html %]/img/item-bullet.gif") disc; }
18 </style>
19 </head>
20
21 <body id="circ_reserveratios" class="circ">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'circ-search.inc' %]
24
25 <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>
26
27 <div class="main container-fluid">
28     <div class="row">
29         <div class="col-sm-10 col-sm-push-2">
30             <main>
31
32 <h1>Hold ratios to calculate items needed</h1>
33    <h3>Calculated on [% todaysdate | $KohaDates %]. From [% from | $KohaDates %]
34     to [% to | $KohaDates %]</h3>
35 <p>These items have a hold ratio &ge; [% ratio | html %].</p>
36 <div class="sql">[% sql | html %]</div>
37
38 [% IF ( reserveloop ) %]
39     <table id="holdst">
40       <thead>
41         <tr>
42           <th>Holds</th>
43           <th>Items</th>
44           <th>Hold ratio</th>
45           <th>Title</th>
46           <th>Home libraries</th>
47           <th>Holding libraries</th>
48           <th>Location</th>
49           <th>Itype</th>
50           <th>Call numbers</th>
51           <th>Items needed</th>
52         </tr>
53       </thead>
54       <tbody>
55       [% FOREACH reserveloo IN reserveloop %]
56         <tr>
57             <td><p>[% reserveloo.reservecount | html %]</p></td>
58             <td><p>[% reserveloo.itemcount | html %]</p></td>
59             <td><a href="#" class="ratiolimit">[% reserveloo.thisratio | html %]</a></td>
60             <td>
61                 [% INCLUDE 'biblio-title.inc' biblio=reserveloo link = 1 %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
62             </td>
63             <td>
64                   <ul>
65                       [% FOREACH homebranch IN reserveloo.homebranch_list %]
66                           <li>[% Branches.GetName ( homebranch ) | html %]</li>
67                       [% END %]
68                   </ul>
69             </td>
70             <td>
71                   <ul>
72                       [% FOREACH holdingbranch IN reserveloo.holdingbranch_list %]
73                           <li>[% Branches.GetName ( holdingbranch ) | html %]</li>
74                       [% END %]
75                   </ul>
76             </td>
77             <td>
78                   <ul>
79                       [% FOREACH location IN reserveloo.location %]
80                           <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location ) | html %]</li>
81                       [% END %]
82                   </ul>
83             </td>
84             <td>
85                   <ul>
86                       [% FOREACH itype IN reserveloo.itype %]
87                           <li>[% ItemTypes.GetDescription( itype ) | html %]</li>
88                       [% END %]
89                   </ul>
90             </td>
91             <td>
92                   <ul>
93                       [% FOREACH listcall IN reserveloo.listcall %]
94                           <li>[% listcall | html %]</li>
95                       [% END %]
96                   </ul>
97             </td>
98             <td class="actions">
99                 <p>
100                     [% IF ( reserveloo.thisratio_atleast1 ) %]
101                         [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc | html %] -->
102                             <a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;rr_quantity_to_order=[% reserveloo.ratiocalc | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% reserveloo.ratiocalc | html %] to order</a>
103                         [% ELSE %]
104                             <strong>[% reserveloo.ratiocalc | html %] to order</strong>
105                         [% END %]
106                         [% IF ( reserveloo.pendingorders ) %]<br><strong>[% reserveloo.pendingorders | html %] pending</strong>[% END %]
107                     [% ELSE %]
108                         0 to order
109                     [% END %]
110                 </p>
111             </td>
112         </tr>
113       [% END %]
114       </tbody>
115     </table>
116     [% ELSE %]
117         <strong>No items found.</strong>
118     [% END %]
119
120             </main>
121         </div> <!-- /.col-sm-10.col-sm-push-2 -->
122
123         <div class="col-sm-2 col-sm-pull-10">
124             <aside>
125
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 | html %]" />
133     </li>
134
135     <li class="checkbox">
136         [% IF include_ordered %]
137             <input id="include_ordered" name="include_ordered" type="checkbox" checked="checked"/>
138         [% ELSE %]
139             <input id="include_ordered" name="include_ordered" type="checkbox"/>
140         [% END %]
141         <label for="include_ordered">Include ordered</label>
142     </li>
143
144     <li class="checkbox">
145         [% IF include_suspended %]
146             <input id="include_suspended" name="include_suspended" type="checkbox" checked="checked"/>
147         [% ELSE %]
148             <input id="include_suspended" name="include_suspended" type="checkbox"/>
149         [% END %]
150         <label for="include_suspended">Include suspended</label>
151     </li>
152
153     <li>
154         <label for="from">Start date:</label>
155         <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
156     </li>
157
158     <li>
159         <label for="to">End date:</label>
160         <input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="datepickerto" />
161     </li>
162 </ol>
163 (inclusive)
164
165 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
166 </fieldset>
167 [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]
168 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
169 <input type="hidden" name="basketno" value="[% basketno | html %]" />
170 [% END %]
171 </form>
172
173             </aside>
174         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
175      </div> <!-- /.row -->
176
177 [% MACRO jsinclude BLOCK %]
178     [% INCLUDE 'calendar.inc' %]
179     [% INCLUDE 'datatables.inc' %]
180     [% INCLUDE 'columns_settings.inc' %]
181     <script>
182         var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
183         $(document).ready(function() {
184             $(".ratiolimit").on("click", function(e) {
185                 e.preventDefault();
186                 $("#ratio").val($(this).html());
187             });
188             KohaTable("holdst", {
189                 "aaSorting": [ [2,'desc'], [3,'asc'] ],
190                   "aoColumnDefs": [
191                       { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
192                       { "aTargets": [ 3 ], "sType": "anti-the" },
193                     ],
194                 "sPaginationType": "full",
195                 "autoWidth": false
196             }, columns_settings);
197        });
198   </script>
199 [% END %]
200
201 [% INCLUDE 'intranet-bottom.inc' %]