Bug 20398: Added a syspref to highlight or not highlight search terms in results...
authorThibaudGLT <thibaud.guillot@biblibre.com>
Wed, 8 Dec 2021 09:16:38 +0000 (09:16 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Apr 2022 13:49:17 +0000 (15:49 +0200)
commit437a3e1de58e0555c0c9a7f1891ffe351d2ce94e
tree8bfd82285046a54a299e108329a14c2e50d46ca8
parent075cd4b9378facce1d3919fb5ed0c44c29ee4d46
Bug 20398: Added a syspref to highlight or not highlight search terms in results on the staff interface

There is a possibility on OPAC but not yet on the staff interface, so I added this syspref which has the same behaviour as the OPAC highlighting syspref.
When you choose to disable highlighting on the syspref, the toggle anchor in the result page does not appear at all.
But if you keep the default state (highlighting on), you still have the option to switch between "Unhighlight" and "Highlight" modes.

Test plan :
1. Go to the syspref named "StaffHighlightedWords" and see that the default state is "Highlight".
2. Look for something in the catalogue for example and see that the words are highlighted and that it is also possible to change between "Unhighlight" and "Highlight".
3. Go back to syspref and choose to disable highlighting by choosing "Don't Highlight".
4. Refresh your results page if you have not closed it or reload a new search.
5. There is no highlighting at all and anchors do not exist (same behaviour as the OPAC interface).

Signed-off-by: ManuB <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/add-system-preference-StaffHighlightedWords.perl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
koha-tmpl/intranet-tmpl/prog/js/pages/results.js