Bug 11994: Fix OpenSearch discovery in the OPAC
authorOwen Leonard <oleonard@myacpl.org>
Tue, 28 Apr 2020 14:41:47 +0000 (14:41 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Thu, 23 Jul 2020 23:39:30 +0000 (01:39 +0200)
commitd330f343e94fd61b6495580f9b9d55730dc95b2e
treeb1542db18842956767e6d2131c41cc0d5e32efdd
parentab12d8ed94f5d451efe10428ffaa96d1d5efb14e
Bug 11994: Fix OpenSearch discovery in the OPAC

This patch corrects the markup for the OpenSearchDescription XML
document and adds (back) the link in the OPAC header which points to it.
This will enable compatible browsers to offer the addition of the OPAC's
keyword search as a search engine option.

I've found documentation suggesting this feature is available (or at
least was at one time) in Chrome and Safari, but in my test it only
works in Firefox.

To test, apply the patch and make sure the OPACBaseURL preference is
set correctly.

 - Open the OPAC in Firefox (these instructions assume the latest
   version, currently v.75).
 - On the right side of the address bar you should see ". . ." Click it
   to trigger the menu.
 - You should see an "Add search engine" entry with your OPAC's icon.
 - Click to add the search engine.

 - Type a keyword to search in the address bar
 - A box should pop up below the address bar showing icons at the bottom
   for performing a search in various search engines. One of these icons
   should be the icon for your Koha OPAC.
 - Click the Koha OPAC icon and confirm that it triggers a keyword
   search in your OPAC.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ef7b3db4cab73797ba3386b4951c0d86addf871)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f9b44c95a02e5f24d4441622949225757db1b95)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 8019711adf319483f4baa4b4bc3b78972d9715ec)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt