From 7d03dfb5990f4b850dce38352ec5e9900a107f3b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 12 Feb 2021 17:08:25 +0000 Subject: [PATCH] Bug 27695: Fix style of messages on Elasticsearch configuration page This patch makes minor modifications to SCSS and HTML to make messages on the Elasticsearch configuration page more consistent with other interfaces. To test you should have Elasticsearch selected as your search engine. - Apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) - Go to Administration -> Search engine configuration (Elasticsearch) - You should see a full-width "note" style message under the page heading, "Warning: Any changes..." - Click the "Reset mappings" button at the bottom of the page. The confirmation alert you see should appear above the note-style message. - I'm not sure how to trigger an "error" type message on this page, but you can test the updated style by going to Administration -> Currencies and submit a new currency with the same name and symbol as one which already exists. Signed-off-by: Michal Denar Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart (cherry picked from commit e9d2aa498b38343f51a51822c68995bd72110d50) Signed-off-by: Fridolin Somers --- .../prog/css/src/staff-global.scss | 3 ++- .../searchengine/elasticsearch/mappings.tt | 26 +++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) 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 9d7e9bb8ff..7bd9f477dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1756,7 +1756,8 @@ i { } } -.alert { +.alert, +.error { background: linear-gradient(to bottom, #FEF8D3 0%, #FFEC91 9%, #FFED87 89%, #F9DC00 100%); border: 1px solid #E0C726; color: inherit; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt index 8e84c17858..edf48c7ea0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -56,16 +56,7 @@ a.add, a.delete { [% END %]

Search engine configuration (Elasticsearch)

-
- Warning: Any changes to the configuration will only take effect after a full reindex. Until then searching may not work correctly. -

Weight: define weight as a positive number. Higher numbers indicate increased relevancy. - Note that fields weighting works only for simple search.

-
    -
  1. only search fields mapped with biblios can be weighted
  2. -
  3. search will boost/increase weighted field(s) relevancy
  4. -
-
[% IF errors %]
Changes have not been applied. Please check the following values: @@ -90,12 +81,25 @@ a.add, a.delete { -
+
[% END %] + +
+ + Warning: Any changes to the configuration will only take effect after a full reindex. Until then searching may not work correctly. + +

Weight: define weight as a positive number. Higher numbers indicate increased relevancy. + Note that fields weighting works only for simple search.

+
    +
  1. Only search fields mapped with biblios can be weighted
  2. +
  3. Search will boost/increase weighted field(s) relevancy
  4. +
+
+
    @@ -446,7 +450,7 @@ a.add, a.delete {

- +

-- 2.39.5