@@ -, +, @@ the OPAC --- ...32-add_OPACWikipediaSearchSuggestions_syspref.sql | 7 +++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ .../opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 4 ++++ koha-tmpl/opac-tmpl/bootstrap/js/wikipedia-search.js | 20 ++++++++++++++++++++ 5 files changed, 39 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_25532-add_OPACWikipediaSearchSuggestions_syspref.sql create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/wikipedia-search.js --- a/installer/data/mysql/atomicupdate/bug_25532-add_OPACWikipediaSearchSuggestions_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_25532-add_OPACWikipediaSearchSuggestions_syspref.sql @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ( "OPACWikipediaSearchSuggestions", 0, NULL, "Enable a search suggestion to the OPAC Search box.","YesNo" ) }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 25532 - Add a wikipedia-style search suggestion feature to the OPAC)\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -433,6 +433,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'), ('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'), ('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'), +('OPACWikipediaSearchSuggestions','0','NULL','Enable search suggestions based on data entered into the search box','YesNo'), ('OPACSearchForTitleIn','