From 879de5f73d9f6049bef7da47e52568d3a802455f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 27 Oct 2025 16:26:08 +0000 Subject: [PATCH] Bug 39398: Improve style and layout of staff interface advanced search form This patch updates the staff interface advanced search form to make it more responsive and to style it similarly to the item search form. To test, apply the patch and rebuild the staff interface CSS. - Go to the advanced search page in the staff interface. - Test the layout at various widths. Everything should adjust well. - Test in the "More options" view. - Test that adding and removing fields works correctly. - Test when using Zebra and Elasticsearch (SearchEngine system preference). - With Elasticsearch, test with ElasticsearchMARCFormat set to "Searchable array". - Test with IncludeSeeFromInSearches enabled. - Test using both MARC21 and UNIMARC. - Confirm that searching works correctly in all cases. Sponsored-by: Athens County Public Libraries --- .../prog/css/src/_variables.scss | 4 +- .../prog/css/src/staff-global.scss | 36 +- .../prog/en/includes/search_indexes.inc | 368 ++++----- .../prog/en/includes/subtype_limits.inc | 514 ++++++------ .../prog/en/includes/subtypes_unimarc.inc | 19 +- .../prog/en/modules/catalogue/advsearch.tt | 732 +++++++++++------- 6 files changed, 946 insertions(+), 727 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss index 1416c7f0be6..9cb1c8b9009 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss @@ -906,7 +906,7 @@ $input-padding-y-lg: $input-btn-padding-y-lg; $input-padding-x-lg: $input-btn-padding-x-lg; $input-font-size-lg: $input-btn-font-size-lg; -$input-bg: var(--#{$prefix}body-bg); +$input-bg: $white; // var(--#{$prefix}body-bg); $input-disabled-color: null; $input-disabled-bg: var(--#{$prefix}secondary-bg); $input-disabled-border-color: null; @@ -920,7 +920,7 @@ $input-border-radius: .375rem; // var(--#{$prefix}border-radiu $input-border-radius-sm: var(--#{$prefix}border-radius-sm); $input-border-radius-lg: var(--#{$prefix}border-radius-lg); -$input-focus-bg: $input-bg; +$input-focus-bg: $white; // $input-bg; $input-focus-border-color: tint-color($component-active-bg, 50%); $input-focus-color: $input-color; $input-focus-width: $input-btn-focus-width; 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 f8c9cefcd75..01cfdc5ba28 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -84,6 +84,23 @@ $enable-dark-mode: false; } } +.label-btn { + @include button-variant( + $default-bs-btn-bg, + transparent, // $default-bs-btn-border-color, + $default-bs-btn-color, + transparent, // $default-bs-btn-hover-bg, + #EEE, // $default-bs-btn-hover-border-color, + $default-bs-btn-hover-color, + #EEE, // $default-bs-btn-active-bg, + #BCBCBC, // $default-bs-btn-active-border-color, + $default-bs-btn-active-color, + $default-bs-btn-disabled-bg, + $default-bs-btn-disabled-border-color, + $default-bs-btn-disabled-color + ) +} + ::selection { background: $background-color-primary; color: #FFFFFF; @@ -2662,25 +2679,6 @@ td.bundle { width: 50%; } -#advsearches { - margin-bottom: 1em; - - .tab-pane { - margin: 0 1em 1em 0; - - table { - border-collapse: separate; - border-spacing: 5px; - border-width: 0; - } - - td { - border: 1px solid #EEE; - padding: .3em .4em; - } - } -} - #circ_circulation_issue { position: relative; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc index ea67ed02342..3eb9a00a08a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc @@ -3,187 +3,189 @@ [% SET index = 0 %] [% END %] [% SET select_id = refiner ? 'refiner_idx_' _ index : 'idx_' _ index %] - + [% IF ms_kw %] + + [% ELSE %] + + [% END %] + [% IF ms_kwcommaphr %] + + [% ELSE %] + + [% END %] + [% IF ms_au %] + + [% ELSE %] + + [% END %] + [% IF ms_aucommaphr %] + + [% ELSE %] + + [% END %] + [% IF ms_cpn %] + + [% ELSE %] + + [% END %] + [% IF ms_cfn %] + + [% ELSE %] + + [% END %] + [% IF ms_cpncommaphr %] + + [% ELSE %] + + [% END %] + [% IF ms_cfncommaphr %] + + [% ELSE %] + + [% END %] + [% IF ms_pn %] + + [% ELSE %] + + [% END %] + [% IF ms_pncommaphr %] + + [% ELSE %] + + [% END %] + [% IF ms_ti %] + + [% ELSE %] + + [% END %] + [% IF ms_ticommaphr %] + + [% ELSE %] + + [% END %] + [% IF ms_se %] + + [% ELSE %] + + [% END %] + [% IF ms_su %] + + [% ELSE %] + + [% END %] + [% IF ms_sucommaphr %] + + [% ELSE %] + + [% END %] + [% IF ( expanded_options ) %] + [% IF ms_sudashbr %] + + [% ELSE %] + + [% END %] + [% IF ms_sudashna %] + + [% ELSE %] + + [% END %] + [% IF ms_sudashrl %] + + [% ELSE %] + + [% END %] + [% END %] + [% IF ms_bc %] + + [% ELSE %] + + [% END %] + [% IF ms_locationcommawrdl %] + + [% ELSE %] + + [% END %] + [% IF ( Koha.Preference('IntranetNumbersPreferPhrase') ) %] + [% IF ms_identcommaphr %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ms_ident %] + + [% ELSE %] + + [% END %] + [% END %] + [% IF ms_nb %] + + [% ELSE %] + + [% END %] + [% IF ms_ns %] + + [% ELSE %] + + [% END %] + [% IF ( Koha.Preference('IntranetNumbersPreferPhrase') ) %] + [% IF ms_callnumcommaphr %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ms_callnum %] + + [% ELSE %] + + [% END %] + [% END %] + [% IF ms_lncommartrn %] + + [% ELSE %] + + [% END %] + [% IF ms_nt %] + + [% ELSE %] + + [% END %] + [% IF (marcflavour != 'UNIMARC' ) %] + [% IF ms_curriculum %] + + [% ELSE %] + + [% END %] + [% END %] + [% IF ms_pb %] + + [% ELSE %] + + [% END %] + [% IF ms_pl %] + + [% ELSE %] + + [% END %] - [%# Use non-normalized st-year instead of st-numeric, %] - [%# since pubdate can include 'u' to signify unknown %] - [%# dates. See "Legal Characters" at: %] - [%# http://www.loc.gov/marc/bibliographic/bd008a.html %] - [%# This search is also for date ranges due to the %] - [%# special Zebra r=r CCL mapping for 'yr' %] - [% IF ms_yrcommastdashyear %] - - [% ELSE %] - - [% END %] - [% IF ms_acqdatecommastdashdatedashnormalized %] - - [% ELSE %] - - [% END %] - + [%# Use non-normalized st-year instead of st-numeric, %] + [%# since pubdate can include 'u' to signify unknown %] + [%# dates. See "Legal Characters" at: %] + [%# http://www.loc.gov/marc/bibliographic/bd008a.html %] + [%# This search is also for date ranges due to the %] + [%# special Zebra r=r CCL mapping for 'yr' %] + [% IF ms_yrcommastdashyear %] + + [% ELSE %] + + [% END %] + [% IF ms_acqdatecommastdashdatedashnormalized %] + + [% ELSE %] + + [% END %] + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc index 01712ec06c7..9b88e09a349 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc @@ -1,256 +1,268 @@ [%- BLOCK subtype_dropdowns -%] - +

+ + +

- +

+ + +

- [% SET lformat = 'l-format' %] - +

+ [% SET lformat = 'l-format' %] + + +

- +

+ + +

[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc index 3e543b5c8ff..6107e2ecc7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc @@ -1,9 +1,5 @@ -

- Show coded information filters - -

- @@ -383,20 +565,35 @@ [% Asset.css("css/humanmsg.css") | $raw %] [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] [% END %] -- 2.39.5