From e7a8883934f5db47013313b70b88775f242a10c0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 7 Mar 2023 12:00:30 +0000 Subject: [PATCH] Bug 32914: (follow-up) Add CSS to improve tab layout This patch adds a "clearfix" snippet of CSS to _mixins.scss copied from Bootstrap. Applied to the active tab pane, this helps in situations where Bootstrap tabs follow a floated element. The patch also wraps tab label strings in to ensure they can be translated. Unrelated: The patch removes an extra from the batch record modification template. To test, apply the patch and rebuild the staff interface CSS. Check Cataloging -> Batch record deletion and Cataloging -> Batch record modification to confirm that the tab layout looks correct. --- koha-tmpl/intranet-tmpl/prog/css/src/_mixins.scss | 9 +++++++++ koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 6 ++++++ .../prog/en/modules/tools/batch_delete_records.tt | 6 +++--- .../prog/en/modules/tools/batch_record_modification.tt | 9 ++++----- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_mixins.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_mixins.scss index d5924acd0b..68354bd282 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_mixins.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_mixins.scss @@ -76,3 +76,12 @@ $nav-menu-bullet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/s background-color: white; } } + +/* Copied from Bootstrap 5 */ +@mixin clearfix() { + &::after { + clear: both; + content: ""; + display: block; + } +} diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index fd0b6531b3..c15efbf7fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4376,6 +4376,12 @@ div .suggestion_note { margin: .5em; } +.tab-pane { + &.active { + @include clearfix(); + } +} + @import "header"; @import "toolbar"; @import "forms"; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt index eddcbe1250..00f46442a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt @@ -71,11 +71,11 @@ [% WRAPPER tabs id= "batch_del_form" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "uploadfile_tab" bt_active= 1 %] Upload a file [% END %] + [% WRAPPER tab_item tabname= "uploadfile_tab" bt_active= 1 %] Upload a file [% END %] [% IF lists.count %] - [% WRAPPER tab_item tabname= "shelves_tab" %] Select a list of records [% END %] + [% WRAPPER tab_item tabname= "shelves_tab" %] Select a list of records [% END %] [% END %] - [% WRAPPER tab_item tabname= "enterlist_tab" %] Enter a list of record numbers [% END %] + [% WRAPPER tab_item tabname= "enterlist_tab" %] Enter a list of record numbers [% END %] [% END # /WRAPPER tabs_nav %] [% WRAPPER tab_panels %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt index e028a04af2..f8fac02641 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt @@ -86,14 +86,14 @@

- [% WRAPPER tabs id= "batch_mod_form" %] + id= "batch_mod_form" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "uploadfile_tab" bt_active= 1 %] Upload a file [% END %] + [% WRAPPER tab_item tabname= "uploadfile_tab" bt_active= 1 %] Upload a file [% END %] [% IF lists.count %] - [% WRAPPER tab_item tabname= "shelves_tab" %] Select a list of records [% END %] + [% WRAPPER tab_item tabname= "shelves_tab" %] Select a list of records [% END %] [% END %] - [% WRAPPER tab_item tabname= "enterlist_tab" %] Enter a list of record numbers [% END %] + [% WRAPPER tab_item tabname= "enterlist_tab" %] Enter a list of record numbers [% END %] [% END # /WRAPPER tabs_nav %] [% WRAPPER tab_panels %] [% WRAPPER tab_panel tabname="uploadfile_tab" bt_active= 1 %] @@ -115,7 +115,6 @@ [% FOREACH list IN lists %] [% END %] - -- 2.30.2