@@ -, +, @@ --- installer/data/mysql/sysprefs.sql | 6 +++ installer/data/mysql/updatedatabase.pl | 12 +++++ .../prog/en/modules/admin/preferences/opac.pref | 45 ++++++++++++++++++++ .../opac-tmpl/prog/en/modules/opac-advsearch.tt | 19 +++++++- opac/opac-search.pl | 9 ++++ 5 files changed, 89 insertions(+), 2 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -411,3 +411,9 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchItemType','both','Choose whether or not to show Item Type selection options on Fewer and More options pages','neither|moreonly|both','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchLanguage','both','Choose whether or not to show Langague selection options on Fewer and More options pages','neither|moreonly|both','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchLocation','both','Choose whether or not to show Location Availability selection options on Fewer and More options pages','neither|moreonly|both','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchPubDate','both','Choose whether or not to show Publication Date Range selection options on Fewer and More options pages','neither|moreonly|both','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchSorting','both','Choose whether or not to show the Sorting options on Fewer and More options pages','neither|moreonly|both','Choice'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchSubtype','moreonly','Choose whether or not to show the Subtype Limiting options on Fewer and More options pages','neither|moreonly|both','Choice'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -6400,6 +6400,18 @@ if ( CheckVersion($DBversion) ) { } +$DBversion = 'XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchItemType','both','Choose whether or not to show Item Type selection options on Fewer and More options pages','neither|moreonly|both','Choice');"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchLanguage','both','Choose whether or not to show Langague selection options on Fewer and More options pages','neither|moreonly|both','Choice');"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchLocation','both','Choose whether or not to show Location Availability selection options on Fewer and More options pages','neither|moreonly|both','Choice');"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchPubDate','both','Choose whether or not to show Publication Date Range selection options on Fewer and More options pages','neither|moreonly|both','Choice');"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchSorting','both','Choose whether or not to show the Sorting options on Fewer and More options pages','neither|moreonly|both','Choice');"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchSubtype','moreonly','Choose whether or not to show the Subtype Limiting options on Fewer and More options pages','neither|moreonly|both','Choice');"); + print "Upgrade to $DBversion done (Add OpacAdvSearchItemType, OpacAdvSearchLanguage, OpacAdvSearchLocation, OpacAdvSearchPubDate, OpacAdvSeachSorting, and OpacAdvSeachSubtype to syspref)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -573,3 +573,48 @@ OPAC: - pref: PatronSelfRegistrationBorrowerUnwantedField class: multi - (separate columns with |) + - "the item collection code when finding items for the shelf browser." + + Advanced Search Options: + - + - "Show item type search options" + - pref: OpacAdvSearchItemType + choices: + neither: never + moreonly: only on More Options page + both: always + - + - "Show publication date range search options" + - pref: OpacAdvSearchPubDate + choices: + neither: never + moreonly: only on More Options page + both: always + - + - "Show language search options" + - pref: OpacAdvSearchLanguage + choices: + neither: never + moreonly: only on More Options page + both: always + - + - "Show location and availability search options" + - pref: OpacAdvSearchLocation + choices: + neither: never + moreonly: only on More Options page + both: always + - + - "Show sorting search options" + - pref: OpacAdvSearchSorting + choices: + neither: never + moreonly: only on More Options page + both: always + - + - "Show subtype search limits" + - pref: OpacAdvSearchSubtype + choices: + neither: never + moreonly: only on More Options page + both: always --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt @@ -129,6 +129,7 @@ [New search] +[% IF OpacAdvSearchPubDate == "both" || ( OpacAdvSearchPubDate == "moreonly" && expanded_options) %]