Bug 29602: Surround strings with span tag
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / reserveratios.tt
index 224c092..53081d2 100644 (file)
@@ -4,17 +4,15 @@
 [% USE AuthorisedValues %]
 [% USE Branches %]
 [% USE ItemTypes %]
-[% USE ColumnsSettings %]
+[% USE TablesSettings %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
+<title>Hold ratios &rsaquo; Circulation &rsaquo; Koha</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <style>
     .sql { display: none; }
     .ulined { text-decoration: underline; }
-    .ratiolimit:link { color: blue; cursor: pointer; }
-    .ratiolimit:hover { color: blue; text-decoration: underline; }
-    #holdst ul li {  list-style: outside url("[% interface | html %]/[% theme | html %]/img/item-bullet.gif") disc; }
+    #holdst ul li {  list-style: outside url("[% interface | html %]/[% theme | html %]/img/item-bullet.svg") disc; }
 </style>
 </head>
 
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'circ-search.inc' %]
 
-<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>
+<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+    <ol>
+        <li>
+            <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+        </li>
+        <li>
+            <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
+        </li>
+        <li>
+            <a href="#" aria-current="page">
+                Hold ratios
+            </a>
+        </li>
+    </ol>
+</nav>
 
 <div class="main container-fluid">
     <div class="row">
           <th>Holds</th>
           <th>Items</th>
           <th>Hold ratio</th>
-          <th>Title</th>
+          <th class="anti-the">Title</th>
           <th>Home libraries</th>
           <th>Holding libraries</th>
           <th>Location</th>
           <th>Itype</th>
-          <th>Call numbers</th>
+          <th class="natural">Call numbers</th>
           <th>Items needed</th>
         </tr>
       </thead>
@@ -56,8 +68,9 @@
         <tr>
             <td><p>[% reserveloo.reservecount | html %]</p></td>
             <td><p>[% reserveloo.itemcount | html %]</p></td>
-            <td><a href="#" class="ratiolimit">[% reserveloo.thisratio | html %]</a></td>
-            <td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% INCLUDE 'biblio-title.inc' biblio=reserveloo %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
+            <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reserveloo.biblionumber | uri %]" >[% reserveloo.thisratio | html %]</a></td>
+            <td>
+                [% INCLUDE 'biblio-title.inc' biblio=reserveloo link = 1 %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
             </td>
             <td>
                   <ul>
@@ -76,7 +89,7 @@
             <td>
                   <ul>
                       [% FOREACH location IN reserveloo.location %]
-                          <li>[% AuthorisedValues.GetByCode( 'LOC', location ) | html %]</li>
+                          <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location ) | html %]</li>
                       [% END %]
                   </ul>
             </td>
             <td class="actions">
                 <p>
                     [% IF ( reserveloo.thisratio_atleast1 ) %]
-                        [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc | html %] -->
-                            <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>
+                        [% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.copies_to_buy | html %] -->
+                            <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.copies_to_buy | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% reserveloo.copies_to_buy | html %] to order</a>
                         [% ELSE %]
-                            <b>[% reserveloo.ratiocalc | html %] to order</b>
+                            <strong>[% reserveloo.copies_to_buy | html %] to order</strong>
                         [% END %]
-                        [% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders | html %] pending</b>[% END %]
+                        [% IF ( reserveloo.pendingorders ) %]<br><strong>[% reserveloo.pendingorders | html %] pending</strong>[% END %]
                     [% ELSE %]
-                        0 to order
+                        <span>0 to order</span>
                     [% END %]
                 </p>
             </td>
       </tbody>
     </table>
     [% ELSE %]
-        <b>No items found.</b>
+        <strong>No items found.</strong>
     [% END %]
 
             </main>
 <h4>Refine results:</h4>
 <ol>
     <li>
-        <label for="ratio">Hold ratio:</label>
+        <label for="ratio">Hold ratio (greater than or equal to):</label>
         <input type="text" size="5" id="ratio" name="ratio" value="[% ratio | html %]" />
     </li>
 
 
     <li>
         <label for="from">Start date:</label>
-        <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
+        <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="flatpickr" data-date_to="to" />
     </li>
 
     <li>
         <label for="to">End date:</label>
-        <input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="datepickerto" />
+        <input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="flatpickr" />
     </li>
 </ol>
 (inclusive)
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
     <script>
-        var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
+        var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
         $(document).ready(function() {
-            $(".ratiolimit").on("click", function(e) {
-                e.preventDefault();
-                $("#ratio").val($(this).html());
-            });
             KohaTable("holdst", {
                 "aaSorting": [ [2,'desc'], [3,'asc'] ],
                   "aoColumnDefs": [
-                      { "aTargets": [ 0,1,2,8 ], "sType": "natural" },
-                      { "aTargets": [ 3 ], "sType": "anti-the" },
+                      { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
+                      { "sType": "natural", "aTargets" : [ "natural" ] },
                     ],
                 "sPaginationType": "full",
                 "autoWidth": false