Bug 21945: Clean up stock rotation template
authorOwen Leonard <oleonard@myacpl.org>
Tue, 4 Dec 2018 16:52:44 +0000 (16:52 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 28 Jan 2019 14:47:26 +0000 (14:47 +0000)
This patch makes some minor markup upgrades to the stock rotation
template: Replace some YUI markup with Bootstrap; Add some missing <tr>
tags; Remove invalid "type" attribute from <script> tag.

To test, apply the patch and go to Tools -> Stock rotation. Confirm that
the page looks correct and adjusts well at various browser widths. Test
with various views: New rota, edit rota, manage stages, manage items.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt

index 7d98a93..7cbf98f 100644 (file)
 
 </div>
 
-<div id="doc3" class="yui-t2">
-    <div id="bd">
-        <div id="yui-main">
-            <div id="stockrotation" class="yui-b">
+<div class="main container-fluid">
+    <div class="row">
+        <div class="col-sm-10 col-sm-push-2">
+            <main>
+
+            <div id="stockrotation">
 
                 [% IF no_op_set %]
 
                     [% IF existing_rotas.size > 0 %]
                         <table class="rotas_table" role="grid">
                             <thead>
+                                <tr>
                                 <th>Name</th>
                                 <th>Cyclical</th>
                                 <th>Active</th>
                                 <th>Description</th>
                                 <th>Number of items</th>
                                 <th>&nbsp;</th>
+                                </tr>
                             </thead>
                             <tbody>
                                 [% FOREACH rota IN existing_rotas %]
                         <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
                         <table id="sr_manage_items" class="items_table" role="grid">
                             <thead>
+                                <tr>
                                 <th>Barcode</th>
                                 <th>Title</th>
                                 <th>Author</th>
                                 <th class="NoSearch">In transit</th>
                                 <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
                                 <th class="NoSort">&nbsp;</th>
+                                </tr>
                             </thead>
                             <tbody>
                                 [% FOREACH item IN items %]
 
                 [% END %]
             </div>
-        </div>
-        <div class="yui-b">
-            [% INCLUDE 'tools-menu.inc' %]
-        </div>
-    </div>
-</div>
+            </main>
+        </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+        <div class="col-sm-2 col-sm-pull-10">
+            <aside>
+                [% INCLUDE 'tools-menu.inc' %]
+            </aside>
+        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+    </div> <!-- /.row -->
+
 
 [% MACRO jsinclude BLOCK %]
     [% Asset.js("js/tools-menu.js") | $raw %]
     [% INCLUDE 'datatables.inc' %]
     [% Asset.js("js/pages/stockrotation.js") | $raw %]
-    <script type="text/javascript">
-    $(document).ready(function() {
-        $('#sr_manage_items').dataTable($.extend(true, {}, dataTablesDefaults, {
-            "autoWidth": false,
-            "aoColumnDefs": [
-                { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
-                { "bSortable": true, "bSearchable": false, 'aTargets': [ 'NoSearch' ] }
-            ],
-            "sPaginationType": "four_button"
-        }));
-    });
+    <script>
+        $(document).ready(function() {
+            $('#sr_manage_items').dataTable($.extend(true, {}, dataTablesDefaults, {
+                "autoWidth": false,
+                "aoColumnDefs": [
+                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
+                    { "bSortable": true, "bSearchable": false, 'aTargets': [ 'NoSearch' ] }
+                ],
+                "sPaginationType": "four_button"
+            }));
+        });
     </script>
 [% END %]