From 06f9032e1f42430a5b8428326a6693273ed8b1e0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 12 Jul 2019 14:13:50 +0000 Subject: [PATCH] Bug 23307: Add columns configuration to cataloguing/z3950_search.tt This patch adds columns configuration to the DataTable which displays Z39.50 search results in the cataloging module. The Z39.50 results screen has its own server-side paging system, so I added some code to copy the page number information ("Page 2 / 6") to the DataTable toolbar for a more consistent appearance. The wording of that information has also been modified for consistency's sake. To test, apply the patch and restart Plack (or restart_all on kohadevbox) - Go to Cataloging -> New from Z39.50/SRU. - Perform a Z39.50 search which will return multiple pages of results. - Confirm that the DataTable controls work correctly: Search, columns show/hide, export. - Confirm that the page number information is correct as you navigate through pages of results. - Go to Administration -> Columns settings. - Confirm that the columns configuration settings for the z3950_search table in the "Cataloging" section works correctly. Changes made here should be reflected in the table of Z39.50 search results. --- admin/columns_settings.yml | 21 +++++++++++++++++++++ .../prog/en/modules/cataloguing/z3950_search.tt | 18 ++++++++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 213ee001f2..7c57f2a5b6 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -297,6 +297,27 @@ modules: - columnname: stocknumber + z3950_search: + resultst: + - + columnname: server + - + columnname: title + - + columnname: author + - + columnname: date + - + columnname: edition + - + columnname: isbn + - + columnname: lccn + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + coursereserves: courses: course_reserves_table: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index 31bf6f89ee..652608d321 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% SET footerjs = 1 %] [% USE Koha %] +[% USE ColumnsSettings %] [% INCLUDE 'doc-head-open.inc' %] Koha › Z39.50/SRU search results [% INCLUDE 'doc-head-close.inc' %] @@ -204,7 +205,7 @@ [% IF ( show_prevbutton ) %] [% END %] - Page [% current_page | html %] / [% total_pages | html %] + Showing page [% current_page | html %] of [% total_pages | html %] [% IF ( show_nextbutton ) %] [% END %] @@ -234,6 +235,7 @@ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% Asset.js("js/z3950_search.js") | $raw %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %]