From 00b2d7c476a276f0067bd1cbc3b7e8516a71f5b2 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 --- .../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 b1db2c9db8..e2f6eb8f0a 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1793,7 +1793,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 202bb0bc11..a173f6fd3b 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.20.1