@@ -, +, @@ - Go to Tools -> Stock rotation. - In the table of rotas test that sorting works correctly. - Test that the "Column visibility" button works to show and hide columns. The "actions" column should be excluded. - Test that export options (Excel, CSV, etc) exclude the "actions" column. - Choose a rota with multiple items on it and select manage -> stages. Repeat the above DataTables functionality tests. - Go to Administration -> Columns settings and edit the default configuration of the stock rotation tables. Confirm that these changes are reflected in the corresponding tables. --- admin/columns_settings.yml | 35 +++++++++++++++++ .../prog/en/modules/tools/stockrotation.tt | 45 ++++++++++------------ .../intranet-tmpl/prog/js/pages/stockrotation.js | 23 +++++++++++ 3 files changed, 78 insertions(+), 25 deletions(-) --- a/admin/columns_settings.yml +++ a/admin/columns_settings.yml @@ -765,3 +765,38 @@ modules: columnname: actions cannot_be_toggled: 1 cannot_be_modified: 1 + + stockrotation: + stock_rotation: + - + columnname: name + - + columnname: cyclical + - + columnname: active + - + columnname: description + - + columnname: number_of_items + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + + stock_rotation_manage_items: + - + columnname: barcode + - + columnname: title + - + columnname: author + - + columnname: call_number + - + columnname: in_transit + - + columnname: stages + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt @@ -3,6 +3,7 @@ [% USE Koha %] [% USE Branches %] [% USE KohaDates %] +[% USE ColumnsSettings %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Stock rotation @@ -54,14 +55,14 @@

Stock rotation

[% IF existing_rotas.size > 0 %] - +
- + - + [% FOREACH rota IN existing_rotas %] @@ -76,12 +77,12 @@ Edit -
+
-
NameName Cyclical Active Description Number of items  
+
- - - - - - - + + + + + + + + + [% FOREACH item IN items %] @@ -497,23 +500,15 @@ [% INCLUDE 'tools-menu.inc' %] - [% MACRO jsinclude BLOCK %] [% Asset.js("js/tools-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] [% Asset.js("js/pages/stockrotation.js") | $raw %] - [% END %] --- a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js +++ a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js @@ -1,3 +1,5 @@ +/* global KohaTable columns_settings */ + function init() { $('#ajax_status').hide(); $('#ajax_saving_msg').hide(); @@ -62,4 +64,25 @@ $(document).ready(function() { }) } }); + + KohaTable("stock_rotation_manage_items", { + "aoColumnDefs": [ + { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, + { "sType": "anti-the", "aTargets": [ "anti-the" ] } + ], + "sPaginationType": "four_button", + "autoWidth": false, + "exportColumns": [0,1,2,3,4,5] + }, stock_rotation_items_columns_settings); + + KohaTable("stock_rotation", { + "aoColumnDefs": [ + { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, + { "sType": "anti-the", "aTargets": [ "anti-the" ] } + ], + "sPaginationType": "four_button", + "autoWidth": false, + "exportColumns": [0,1,2,3] + }, stock_rotation_columns_settings); + }); --
BarcodeTitleAuthorCallnumberIn transitStages & duration in days
(current stage highlighted)
 
BarcodeTitleAuthorCall numberIn transitStages & duration in days
(current stage highlighted)