From c8add8a97eb72aa94077089546a6bebf49ef34e0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 18 Sep 2024 12:57:40 +0000 Subject: [PATCH] Bug 37955: Fix table's 'configure' button to open correct column settings This patch updates markup and JS code on the table settings page so that clicking a table's "configure" button will open the right panel and scroll you to the correct table. The patch also overrides Bootstrap's default table caption positioning so that captions are above the table instead of below them. Unfortunately this property isn't in Bootstrap's _variables. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface). - Find a table in the staff interface which has a "Configure" button, e.g. Administration -> Libraries. - Click the "Configure" button. - When you arrive at the table settings page the correct panel should be expanded (in this example, Administration), and the page should scroll to the correct table (in this example, libraries). - The table caption ("Table id: libraries") should appear before the table instead of after. Signed-off-by: David Nind --- koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss | 1 + .../prog/en/modules/admin/columns_settings.tt | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss index c03802c4f4..52778d458f 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss @@ -6,6 +6,7 @@ table { border-collapse: collapse; + caption-side: top; thead { border-bottom: 2px solid $table-border-color; 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 2c435dafb1..0870bd58df 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 @@ -30,7 +30,7 @@ [% END %] [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %] [% FOR tablename IN tables.$pagename.keys.sort %] - [% SET table_id = pagename _ '#' _ tablename %] + [% SET table_id = pagename _ '_' _ tablename %]
[% IF pagename == 'additem' AND tablename == 'itemst' %] @@ -369,7 +369,7 @@
@@ -380,12 +380,12 @@ [%- IF ( panel.defined ) -%]