From d990932dfcecdac903947dd48ffbc1be9591a7f2 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 2 Jul 2024 22:11:20 +0000 Subject: [PATCH] Bug 37238: Add column configuration to item search results table To test: 1. APPLY PATCH 2. Do an item search that will return results. 3. To the right of the table notice thee Columns, Export, Configure buttons 4. Use the Columns button to hide and show various columns, make sure it works right. 5. Use the Export button to try and export the table in various file formats. You should only see visible columns in your export. 6. Go to Admin -> Table settings, make sure you can hide columns properly from there. Signed-off-by: Sam Lau --- admin/columns_settings.yml | 52 ++++++++++++++++++ .../prog/en/modules/catalogue/itemsearch.tt | 54 ++++++++++--------- 2 files changed, 81 insertions(+), 25 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 59fe8cd22b2..83a5ecd1bd6 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -608,6 +608,58 @@ modules: cannot_be_toggled: 1 cannot_be_modified: 1 + itemsearch: + results: + columns: + - + columnname: itemsearch_checkbox + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: title + - + columnname: publication_date + - + columnname: publisher + - + columnname: collection + - + columnname: barcode + - + columnname: item_number + - + columnname: serial_enumeration + - + columnname: call_number + - + columnname: home_library + - + columnname: current_library + - + columnname: shelving_location + - + columnname: item_type + - + columnname: inventory_number + - + columnname: notforloan_status + - + columnname: lost_status + - + columnname: withdrawn_status + - + columnname: damaged_status + - + columnname: checkouts + - + columnname: last_checkout_date + - + columnname: due_date + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + cataloguing: addbooks: reservoir-table: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index c02ba8d4cd3..624e1678536 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -2,6 +2,7 @@ [% USE To %] [% USE Asset %] [% USE AuthorisedValues %] +[% USE TablesSettings %] [% PROCESS 'i18n.inc' %] [%- BLOCK form_label -%] [%- SWITCH label -%] @@ -355,6 +356,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %] [% INCLUDE 'select2.inc' %]