@@ -, +, @@
- Go to Administration -> System preferences.
- Search for AdvancedSearchTypes. You should get two results, one for
the OPAC preference and one for the staff interface.
- Check that the OpacAdvancedSearchTypes settings match the
AdvancedSearchTypes settings.
- View the advanced search pages in the staff interface and OPAC to
confirm that the tabs look correct.
- Change the OpacAdvancedSearchTypes and AdvancedSearchTypes settings to
be different and confirm that each is applied separately to each
interface.
- Enable the OpacTopissue system preference.
- View the "Most popular" page in the OPAC.
- The OpacAdvancedSearchTypes settings should be reflected in the
"Refine your search" sidebar: If "Collection" is checked, a filter
for collection should appear. If "Item types" is checked, a filter for
item types should appear.
---
installer/data/mysql/atomicupdate/bug-17018.pl | 13 +++++++++++++
installer/data/mysql/mandatory/sysprefs.sql | 1 +
.../prog/en/modules/admin/preferences/opac.pref | 8 ++++++++
.../bootstrap/en/includes/opac-topissues.inc | 6 +++---
.../bootstrap/en/modules/opac-topissues.tt | 2 +-
opac/opac-search.pl | 2 +-
opac/opac-topissues.pl | 2 +-
7 files changed, 28 insertions(+), 6 deletions(-)
create mode 100755 installer/data/mysql/atomicupdate/bug-17018.pl
--- a/installer/data/mysql/atomicupdate/bug-17018.pl
+++ a/installer/data/mysql/atomicupdate/bug-17018.pl
@@ -0,0 +1,13 @@
+use Modern::Perl;
+
+return {
+ bug_number => "17018",
+ description => "Split AdvancedSearchTypes for staff and OPAC",
+ up => sub {
+ my ($args) = @_;
+ my $dbh = $args->{dbh};
+
+ $dbh->do( "INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) SELECT 'OpacAdvancedSearchTypes', `value`, `options`, 'Select which set of fields are available as limits on the OPAC advanced search page', `type` FROM systempreferences WHERE variable = 'AdvancedSearchTypes'" );
+
+ },
+}
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ a/installer/data/mysql/mandatory/sysprefs.sql
@@ -389,6 +389,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
+('OpacAdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields are available as limits on the OPAC advanced search page','Choice'),
('OPACAllowHoldDateInFuture','0','','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','YesNo'),
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -880,6 +880,14 @@ OPAC:
subtype: Subtypes
sorting: Sorting
location: Location and availability
+ -
+ - Show tabs in the OPAC advanced search for limiting searches by
+ - pref: OpacAdvancedSearchTypes
+ multiple:
+ itemtypes: Item type
+ ccode: Collection
+ loc: Shelving location
+ - "Tabs appear in the order listed.
"
Authentication:
-
- pref: OPACShibOnly
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc
@@ -25,8 +25,8 @@
[% END %]
- [% AdvancedSearchTypes = Koha.Preference('AdvancedSearchTypes').split('\|') %]
- [% IF AdvancedSearchTypes.grep('^itemtypes$').size %]
+ [% OpacAdvancedSearchTypes = Koha.Preference('OpacAdvancedSearchTypes').split(',') %]
+ [% IF OpacAdvancedSearchTypes.grep('^itemtypes$').size %]