From cf29f3cc223d9cfa0d5598fd5b0ecd065f73a0f3 Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Tue, 4 Dec 2018 16:52:44 +0000 Subject: [PATCH] Bug 21945: Clean up stock rotation template 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> --- .../prog/en/modules/tools/stockrotation.tt | 52 +++++++++++++--------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt index 7d98a933f6..7cbf98ff9e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt @@ -42,10 +42,12 @@ </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 %] @@ -56,12 +58,14 @@ [% 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> </th> + </tr> </thead> <tbody> [% FOREACH rota IN existing_rotas %] @@ -362,6 +366,7 @@ <h3>Manage items assigned to "[% rota.title | html %]"</h3> <table id="sr_manage_items" class="items_table" role="grid"> <thead> + <tr> <th>Barcode</th> <th>Title</th> <th>Author</th> @@ -369,6 +374,7 @@ <th class="NoSearch">In transit</th> <th class="NoSort">Stages & duration in days<br>(current stage highlighted)</th> <th class="NoSort"> </th> + </tr> </thead> <tbody> [% FOREACH item IN items %] @@ -492,28 +498,32 @@ [% 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 %] -- 2.11.0