@@ -, +, @@ - Go to Administration -> MARC modification templates. - If necessary, add two or more templates. - Confirm that table of templates displays as a DataTable, with all associated sorting, filtering, export, etc. - The "id" column should be hidden by default. - Confirm that column visibility controls work correctly. - Confirm that the table settings found under Administration -> Table settings work correctly to set the default visibility of the table columns. --- admin/columns_settings.yml | 12 ++++++++++++ .../prog/en/modules/tools/marc_modification_templates.tt | 10 ++++++++-- .../intranet-tmpl/prog/js/marc_modification_templates.js | 8 ++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) --- a/admin/columns_settings.yml +++ a/admin/columns_settings.yml @@ -1525,6 +1525,18 @@ modules: columnname: info - columnname: interface + marc-modification-templates: + templatest: + columns: + - + columnname: id + is_hidden: 1 + - + columnname: template + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 notices: lettert: columns: --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE JSON.Escape %] [% USE Asset %] +[% USE TablesSettings %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] MARC modification templates › Tools › Koha @@ -86,13 +87,15 @@ + - + [% FOREACH TemplatesLoo IN TemplatesLoop %] +
Id TemplateActionsActions
[% TemplatesLoo.template_id | html %] [% TemplatesLoo.name | html %] Edit actions @@ -352,12 +355,15 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/tools-menu.js") | $raw %] - [% Asset.js("js/marc_modification_templates.js") | $raw %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] + [% Asset.js("js/marc_modification_templates.js") | $raw %] [% END %] [% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js +++ a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js @@ -1,4 +1,4 @@ -/* global __ */ +/* global __ KohaTable columns_settings */ $(document).ready(function() { window.modaction_legend_innerhtml = $("#modaction_legend").text(); window.action_submit_value = $("#action_submit").val(); @@ -49,7 +49,7 @@ $(document).ready(function() { } if ( $("#conditional_comparison").val() == '' ) { alert( __("The conditional comparison operator should be filled.") ); - return false + return false; } if ( $("#conditional_value").val() == '' && ( $("#conditional_comparison").val() == 'equals' || $("#conditional_comparison").val() == 'not_equals' ) ) { @@ -108,6 +108,10 @@ $(document).ready(function() { editAction( mmta[0] ); updateAllEvery(); }); + + KohaTable("templatest", { + }, columns_settings); + }); function updateAllEvery(){ --