From 633502b91ed532f18c9e65568cc4154317b8570c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 27 Jun 2023 18:23:59 +0000 Subject: [PATCH] Bug 34135: Show the icons for selected tab to the left of the search bar in the staff interface This patch modifies header search forms so that the form label has the same icon used by the "tab" link. The patch also improves the responsive behavior of the header search by using the icon as the form label when the browser window is narrow enough to hide the label text. I've added the "aria-hidden" attribute to other icons in the modified templates and made the "fa-fw" class consistent for all tab icons. To test, apply the patch and rebuild the staff interface CSS. Clear your browser cache if necessary. View the header search form at various browser sizes to confirm that content is shown and hidden correctly. Test at least one page which uses each of the modified header search includes: - Staff client home page - Acquisitions -> Acquisitions home - Vendor -> - Basket -> Add to basket -> From suggestion - Contracts - Administration -> - Budgets - Currencies - Desks (with UseCirculationDesks enabled) - System preferences - Z39.50/SRU servers - Catalog advanced search - Search results - Authorities -> Authorities home - Cataloging -> Cataloging home - Circulation -> Check out - E-resource management (with ERMModule enabled) - Patrons -> Patrons home - Serials -> Serials home - Tools -> Notices Signed-off-by: Nick Clemens --- .../intranet-tmpl/prog/css/src/_header.scss | 18 ++++++++++++++++++ .../prog/css/src/staff-global.scss | 8 ++++++++ .../prog/en/includes/acquisitions-search.inc | 8 ++++---- .../prog/en/includes/adv-search.inc | 8 ++++---- .../prog/en/includes/authorities-search.inc | 16 ++++++++-------- .../prog/en/includes/budgets-admin-search.inc | 10 +++++----- .../prog/en/includes/cat-search.inc | 8 ++++---- .../prog/en/includes/cataloging-search.inc | 12 ++++++------ .../prog/en/includes/catalogue-search-box.inc | 2 +- .../prog/en/includes/checkin-search-box.inc | 2 +- .../prog/en/includes/checkin-search.inc | 6 +++--- .../prog/en/includes/circ-search.inc | 8 ++++---- .../prog/en/includes/cities-admin-search.inc | 8 ++++---- .../en/includes/contracts-admin-search.inc | 8 ++++---- .../en/includes/currencies-admin-search.inc | 8 ++++---- .../prog/en/includes/desks-admin-search.inc | 8 ++++---- .../prog/en/includes/erm-search.inc | 16 ++++++++-------- .../prog/en/includes/home-search.inc | 10 +++++----- .../prog/en/includes/letters-search.inc | 8 ++++---- .../prog/en/includes/member-search-box.inc | 2 +- .../prog/en/includes/patron-search-box.inc | 2 +- .../prog/en/includes/patron-search-header.inc | 10 +++++----- .../prog/en/includes/patrons-admin-search.inc | 8 ++++---- .../prog/en/includes/prefs-admin-search.inc | 8 ++++---- .../prog/en/includes/renew-search-box.inc | 2 +- .../prog/en/includes/serials-search.inc | 8 ++++---- .../en/includes/suggestions-add-search.inc | 8 ++++---- .../prog/en/includes/z3950-admin-search.inc | 8 ++++---- 28 files changed, 127 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 8234f8a023..c72334c720 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss @@ -113,6 +113,14 @@ a.navbar-toggle { } } + .control-label { + i { + &[class^="fa"] { + margin-left: .5em; + } + } + } + .form-content { background-color: white; margin-left: -16px; @@ -293,7 +301,13 @@ a.navbar-toggle { @media (max-width: 768px) { #header_search { + padding-left: 0; + .form-title { + flex-basis: unset; + } + + .control-text { display: none; } } @@ -305,6 +319,10 @@ a.navbar-toggle { flex-grow: 1; } + .tab-content:first-of-type { + flex-basis: 75%; + } + .tab-title { display: none; } 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 abbc4a82b7..256e9ad98f 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1459,6 +1459,14 @@ i { &.warn { color: #FFA500; } + + &.fa-main-heading-a { + font-family: monospace; + + &::before { + content: "$a"; + } + } } .circ-setting { 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 bb7cfddd61..c446b13844 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc @@ -4,7 +4,7 @@