From 48f5efa2f2072ec4081b1eafd2bb41e0af489094 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 13 Mar 2019 14:19:44 +0100 Subject: [PATCH] Bug 22505: Add column configuration to patron list table Test plan: 1. Create a list of patrons 2. Add some patrons to this list 3. Go to this patron list (/cgi-bin/koha/patron_lists/list.pl?patron_list_id=XXX) 4. Verify that you can show/hide all columns except the one containing the checkbox 5. Verify that you can export the table data using the Export menu 6. Go to admin/columns_settings.pl, and verify that the configuration works for table 'patron-list-table' Signed-off-by: Owen Leonard Signed-off-by: Bin Wen --- admin/columns_settings.yml | 22 +++++++++++++++++++ .../prog/en/modules/patron_lists/list.tt | 7 ++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 296103de45..6aeeeb3b9a 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -517,6 +517,28 @@ modules: columnname: itemtype - columnname: status + patron-lists: + patron-list-table: + - + columnname: checkbox + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: card + - + columnname: firstname + - + columnname: surname + - + columnname: address + - + columnname: category + - + columnname: library + - + columnname: expires_on + - + columnname: circ_notes reports: lostitems: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt index 64bbe6434e..0c184eed4a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt @@ -1,8 +1,10 @@ [% USE raw %] [% USE Asset %] [% USE KohaDates %] +[% USE ColumnsSettings %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] +[% INCLUDE 'columns_settings.inc' %] Koha › Tools › Patron lists › [% list.name | html %] › Add patrons [% INCLUDE 'doc-head-close.inc' %] @@ -184,7 +186,8 @@ $(document).ready(function() { $('#patrons_to_add_fieldset').hide(); - $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, { + var columns_settings_table = [% ColumnsSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %] + KohaTable('patron-list-table', { "order": [[ 3, "asc" ]], "aoColumns": [ null,null,null,null,null,null,null,{ "sType": "title-string" },null @@ -193,7 +196,7 @@ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, ], "sPaginationType": "four_button" - } )); + }, columns_settings_table); patron_autocomplete({ patron_container: $("#patrons_to_add"), -- 2.17.1