From 4293901bafcb9db776f4b5c45d55f51f9aec9c79 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 11 Feb 2013 12:28:37 +0100 Subject: [PATCH] Bug 5888: Followup add a syspref (OPACPopupAuthorsSearch) New syspref OPACPopupAuthorsSearch. If it is disabled, the development has no effect. Signed-off-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov --- installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../en/modules/admin/preferences/opac.pref | 7 +++++++ .../opac-tmpl/prog/en/modules/opac-detail.tt | 18 ++++++++++++++++-- opac/opac-detail.pl | 1 + 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index d4059cbfa7..54690816e4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6421,6 +6421,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion ="3.11.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACPopupAuthorsSearch','0','Display the list of authors when clicking on one author.','','YesNo');"); + print "Upgrade to $DBversion done (Bug 5888 - Subject search pop-up for the OPAC)\n"; + SetVersion($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 300c6e11ad..9b698b0895 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -392,6 +392,13 @@ OPAC: yes: Enable no: Disable - Quote of the Day display on OPAC home page + - + - pref: OPACPopupAuthorsSearch + default: 0 + choices: + yes: Display + no: Don't display + - the list of authors in a pop-up for a search. Policy: - - pref: singleBranchMode diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index c807abc50b..b8f2efc8bd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -370,9 +370,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () { //]]> +[% IF OPACPopupAuthorsSearch %] +[% END %]