From 9aa657cbacd9b05c899d907fb43d913a1236ac01 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 26 Jun 2023 20:30:56 +0000 Subject: [PATCH] Bug 34124: Improve in-page navigation on table settings page This patch adds links to the table settings page so that the user can jump directly to a particular table within a page section. The patch also changes the logic of when in-page links are displayed: I think it makes sense not to show a "Jump to page" link when there is only one page. The page will show a "Jump to table" link only if there is only one table. To test, apply the patch and go to Administration -> Table settings. - Expand and check multiple sections. - In the "Administration" section, there are multiple pages. - Check that the "Jump to page" links work correctly. - In the "Catalog" section, there is only one page: "detail." - Check that the "Jump to table" links work correctly. Signed-off-by: Sam Lau Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 24b2cd367f511e6f5f3dfb4bfb9b34d1e1ec8068) Signed-off-by: Martin Renvoize --- .../prog/en/modules/admin/columns_settings.tt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt index bd8c826f27..149f46b699 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt @@ -3,8 +3,8 @@ [% USE TablesSettings %] [% SET footerjs = 1 %] [% BLOCK pagelist %] - [% IF module.keys and module.keys.size > 0 %] - Jump to: + [% IF module.keys and module.keys.size > 1 %] + Jump to page: [% FOR pagename IN module.keys.sort %] [% pagename | html %] [% UNLESS loop.last %] | [% END %] @@ -18,6 +18,14 @@ [% FOR pagename IN module.keys.sort %]

Page: [% pagename | html %]

[% SET tables = module %] + [% IF tables.$pagename.keys and tables.$pagename.keys.size > 1 %] + Jump to table: + [% FOR tablename IN tables.$pagename.keys.sort %] + [% SET table_id = pagename _ '#' _ tablename %] + [% tablename | html %] + [% UNLESS loop.last %] | [% END %] + [% END %] + [% END %] [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %] [% FOR tablename IN tables.$pagename.keys.sort %] [% SET table_id = pagename _ '#' _ tablename %] -- 2.20.1