From d420c3a111c424a317d1b6a0318e16d8aad190a8 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 14 Sep 2022 16:02:52 +0200 Subject: [PATCH] Bug 30952: Better header search bar on smaller screens - Show only tab icons on screens <= 992px - Hide form title on the left on screens <= 768px - Move some dropdown lists to the "extra" filters area Issue #24 --- .../intranet-tmpl/prog/css/src/_header.scss | 32 ++++++++++++-- .../prog/en/includes/acquisitions-search.inc | 4 +- .../prog/en/includes/adv-search.inc | 8 ++-- .../prog/en/includes/authorities-search.inc | 42 +++++++++++-------- .../prog/en/includes/budgets-admin-search.inc | 22 ++++++---- .../prog/en/includes/cat-search.inc | 8 ++-- .../prog/en/includes/cataloging-search.inc | 10 ++--- .../prog/en/includes/catalogue-search-box.inc | 29 +++++++++---- .../prog/en/includes/checkin-search.inc | 6 +-- .../prog/en/includes/circ-search.inc | 8 ++-- .../prog/en/includes/cities-admin-search.inc | 6 +-- .../en/includes/contracts-admin-search.inc | 6 +-- .../en/includes/currencies-admin-search.inc | 6 +-- .../prog/en/includes/desks-admin-search.inc | 6 +-- .../prog/en/includes/home-search.inc | 10 ++--- .../prog/en/includes/letters-search.inc | 6 +-- .../prog/en/includes/patron-search-header.inc | 10 ++--- .../prog/en/includes/patrons-admin-search.inc | 6 +-- .../prog/en/includes/prefs-admin-search.inc | 6 +-- .../prog/en/includes/serials-search.inc | 6 +-- .../en/includes/suggestions-add-search.inc | 6 +-- .../prog/en/includes/z3950-admin-search.inc | 6 +-- 22 files changed, 148 insertions(+), 101 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss index 193ace5482..ad5f422028 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss @@ -63,15 +63,15 @@ a.navbar-toggle { } > ul { - padding: 0 .8em 0 0; + padding: 0; margin: 0; border-radius: 0 16px 16px 0; display: flex; - justify-content: space-around; align-items: center; color: white; background-color: #418940; z-index: 2; + flex-grow: 1; li { background: transparent; @@ -146,7 +146,6 @@ a.navbar-toggle { } .form-extra-content { - left: 284px; right: 60px; position: absolute; top: 31px; @@ -155,7 +154,7 @@ a.navbar-toggle { padding: 1em; border-radius: 0 0 8px 8px; border: 1px solid #418940; - border-top: 1px solid #e0e0e0; + border-top: 0 none; box-shadow: 0 2px 2px 1px #00000030; z-index: 1; display: none; @@ -164,6 +163,11 @@ a.navbar-toggle { display: block; width: 100%; } + + label { + display: block; + margin-bottom: 0; + } } .form-extra-content-toggle { @@ -223,3 +227,23 @@ a.navbar-toggle { #lastborrowerlink { color: #FFFFFF; } + +@media (max-width: 768px) { + #header_search { + .form-title { + display: none; + } + } +} + +@media (max-width: 992px) { + #header_search { + .tab-title { + display: none; + } + + > ul { + flex-grow: 0; + } + } +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc index 1d28d7d394..3d7f599fd3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc @@ -42,8 +42,8 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc index c531653f87..1312f5f16d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc @@ -7,10 +7,10 @@ [% INCLUDE 'member-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc index 2909383f4d..67c2ea5f08 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc @@ -53,16 +53,22 @@ [% END %] [% BLOCK authtype %] - +
+ +
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc index b610015f95..3542711de1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc @@ -11,6 +11,16 @@ + + + + + + + +
+ + - - - - - +
@@ -34,9 +40,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc index 511893528b..b2b45cde19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc @@ -6,10 +6,10 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc index f31df2d262..1199c79fe1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc @@ -25,11 +25,11 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc index 1106becfaf..00823a1b70 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc @@ -7,23 +7,34 @@ - [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %] - [% INCLUDE 'search_indexes.inc' $header_pulldown = 1 %] - [% END %] [% IF ( Koha.Preference('RetainCatalogSearchTerms') ) %] [% ELSE %] [% END %] - [% IF ( Koha.Preference('IntranetAddMastheadLibraryPulldown') ) %] - - [% END %] + + +
+ [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %] +
+ + [% INCLUDE 'search_indexes.inc' $header_pulldown = 1 %] +
+ [% END %] + + [% IF ( Koha.Preference('IntranetAddMastheadLibraryPulldown') ) %] +
+ + +
+ [% END %] +
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc index e52befd3db..97541c6d30 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc @@ -8,9 +8,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc index 11914086ca..0e770aa46d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc @@ -9,10 +9,10 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc index cfad7765e2..51620c6fbf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc @@ -19,9 +19,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc index 2edc819dee..42cab98c86 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc @@ -20,9 +20,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc index 0c458d6fd8..16adca3705 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc @@ -20,9 +20,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc index 78bca3d346..f25526cade 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc @@ -19,9 +19,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc index f62af7a683..b49ea45843 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc @@ -8,11 +8,11 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc index 959be09300..5ec0553659 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc @@ -20,9 +20,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc index 53d30b08a0..1fc3262562 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -6,10 +6,10 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc index a4e8723af3..6733864b89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc @@ -20,9 +20,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc index 96a747f623..6a0672b420 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc @@ -21,9 +21,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc index 8b7592ab9c..5e60974c15 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc @@ -31,9 +31,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc index 9fcb5c6f9f..d6ff5d1411 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc @@ -24,9 +24,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc index 9efca7cebb..ed7a88e138 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc @@ -20,9 +20,9 @@ [% INCLUDE 'catalogue-search-box.inc' %] -- 2.30.2