Bug 20617: Add 'Search Engine configuration' link to administration menu
authorOwen Leonard <oleonard@myacpl.org>
Fri, 20 Apr 2018 18:35:14 +0000 (18:35 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 23 Apr 2018 17:22:16 +0000 (14:22 -0300)
This patch adds a link to the Elasticsearch configuration page in the
administration sidebar menu when Elasticsearch is enabled.

This patch also corrects the title of the Elasticsearch page to match
the page heading. "Search engine configuration" instead of
"Elasticsearch mappings."

To test, apply the patch and set the SearchEngine system preference to
"Elasticsearch."

  - View any page in the administration module which shows the
    left-hand sidebar menu. The link to search engine configuration
    should be there.
  - View the search engine configuration page and confirm that the page
    title is correct.
  - Set the SearchEngine system preferenc to "Zebra."
  - The search engine configuration link should no longer appear in the
    administration sidebar menu.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt

index 4a52ef3..d41968e 100644 (file)
@@ -37,6 +37,9 @@
     <li><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></li>
     <li><a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a></li>
     <li><a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a></li>
+    [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]
+        <li><a href="/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl">Search engine configuration</a></li>
+    [% END %]
 </ul>
 
 <h5>Acquisition parameters</h5>
index 5014c80..1cb3c41 100644 (file)
@@ -1,6 +1,6 @@
 [% USE Asset %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Administration &rsaquo; Elastic Search mappings</title>
+<title>Koha &rsaquo; Administration &rsaquo; Search engine configuration</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% Asset.js("lib/jquery/plugins/jquery.tablednd.js") %]
 <script type="text/javascript">