From 44445bc0d017737573dbbd33c6eb551d57446c05 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Fri, 21 Oct 2022 16:06:44 +0100
Subject: [PATCH] Bug 31917: Headings fix for preferences search

This patch re-arranges the logic for displaying the search term when
executing a system preference search.

Test plan
1) Without the patch, search for something that will get no results
   'boing' and note how it looks
2) Without the patch, search for something that gets some results
   'block' and note how it looks
3) Apply the patch
4) Repeat your searches and comment on whether the look is better of
   worse ;P

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
 .../intranet-tmpl/prog/en/modules/admin/preferences.tt      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
index 693f50989f..4b8ce6a85f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
@@ -41,7 +41,6 @@
         <div class="col-sm-10 col-sm-push-2">
             <main>
 
-    <h1>System preferences</h1>
     [% IF ( jump_not_found ) %]
     <div class="dialog alert">
         Could not find a system preference named <code>[% jumpfield | html %]</code>.
@@ -51,8 +50,11 @@
     <div class="dialog alert">
         No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
     </div>
+    <h1>System preferences</h1>
     [% ELSIF searchfield %]
-        <h2>You searched for: [% searchfield | html %]</h2>
+    <h1>System preferences matching: [% searchfield | html %]</h1>
+    [% ELSE %]
+    <h1>System preferences</h1>
     [% END %]
     [% FOREACH TAB IN TABS %]
     <div class="prefs-tab">
-- 
2.30.2