@@ -, +, @@ search terms in results on the staff interface --- ...ystem-preference-StaffHighlightedWords.perl | 8 ++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../admin/preferences/staff_interface.pref | 7 +++++++ .../prog/en/modules/catalogue/results.tt | 9 ++++++--- .../intranet-tmpl/prog/js/pages/results.js | 18 ++++++++++++------ 5 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/add-system-preference-StaffHighlightedWords.perl --- a/installer/data/mysql/atomicupdate/add-system-preference-StaffHighlightedWords.perl +++ a/installer/data/mysql/atomicupdate/add-system-preference-StaffHighlightedWords.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) + VALUES ('StaffHighlightedWords','1','','Activate or not highlighting of search terms for staff interface','YesNo ') + }); + NewVersion( $DBversion, '20398', 'Add system preference StaffHighlightedWords'); +} --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -237,6 +237,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'), ('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'), ('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'), +('StaffHighlightedWords','1','','Highlight search terms on staff interface','YesNo'), ('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'), ('HoldsAutoFill','0',NULL,'If on, librarian will not be asked if hold should be filled, it will be filled automatically','YesNo'), ('HoldsAutoFillPrintSlip','0',NULL,'If on, hold slip print dialog will be displayed automatically','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref @@ -120,6 +120,13 @@ Staff interface: type: textarea syntax: text/html class: code + - + - pref: StaffHighlightedWords + type: boolean + choices: + 1: Highlight + 0: Don't highlight + - words searched for in the staff interface search results pages. Options: - - pref: viewMARC --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -81,9 +81,11 @@ | Clear all | - Unhighlight - Highlight - | + [% IF Koha.Preference("StaffHighlightedWords") == 1 %] + Unhighlight + Highlight + | + [% END %] [% IF (Koha.Preference("intranetbookbag")) %]