From 086810633b596eb7d5fdce6fb93f37f42f93c9af 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 Signed-off-by: Lucas Gass Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../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 | 8 ++++---- .../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, 126 insertions(+), 100 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss index a3d68cebbc..0007d2a5dd 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; @@ -302,7 +310,13 @@ a.navbar-toggle { @media (max-width: 768px) { #header_search { + padding-left: 0; + .form-title { + flex-basis: unset; + } + + .control-text { display: none; } } @@ -314,6 +328,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 608e3477cc..e25e4a5460 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1455,6 +1455,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 5c798bf599..4ec298ad1b 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 @@