diff --git a/installer/data/mysql/atomicupdate/bug-17018.pl b/installer/data/mysql/atomicupdate/bug-17018.pl new file mode 100755 index 0000000000..58facba735 --- /dev/null +++ b/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'" ); + + }, +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 331836cfe2..7fe1f84a2f 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -390,6 +390,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'), 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 82ad87630f..bd11665f72 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 @@ -871,6 +871,12 @@ OPAC: subtype: Subtypes sorting: Sorting location: Location and availability + - + - Show tabs in the OPAC advanced search for limiting searches on the + - pref: OpacAdvancedSearchTypes + class: long + - "fields (separate values with |). Tabs appear in the order listed.
" + - "Currently supported values: Item types (itemtypes), Collection, (ccode) and Shelving Location (loc)." Authentication: - - pref: OPACShibOnly diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 701ca3b29e..ed02b37d74 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -96,11 +96,11 @@ Searching: 0: "Don't add" - search history of the unlogged user to the next patron logging in. - - - Show tabs in the OPAC and staff interface advanced search for limiting searches on the + - Show tabs in the staff interface advanced search for limiting searches on the - pref: AdvancedSearchTypes class: long - "fields (separate values with |). Tabs appear in the order listed.
" - - "Currently supported values: Item types (itemtypes), Collection Codes (ccode) and Shelving Location (loc)." + - "Currently supported values: Item types (itemtypes), Collection, (ccode) and Shelving Location (loc)." - - Limit the languages listed in the advanced search drop-down to the - pref: AdvancedSearchLanguages diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc index 11e0b4cf6d..2deef2e69b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc +++ b/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 %]
  • diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt index 68e9dc3839..6c4b668be8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt @@ -65,9 +65,10 @@
    -

    Top issues

    +

    Most popular

    [% IF ( results ) %] + [% OpacAdvancedSearchTypes = Koha.Preference('OpacAdvancedSearchTypes').split('\|') %] - + + [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] @@ -110,13 +112,12 @@ [% IF ( result.item('size') ) %][% result.item('size') | html %][% END %]

    +
    The [% limit | html %] most checked-out @@ -87,7 +88,8 @@
    Title[% IF ( ccodesearch ) %]Collection[% ELSE %]Item type[% END %]Item typeCollection Checkouts  - [% IF Koha.Preference('AdvancedSearchTypes') == 'ccode' %] - Collection - [% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %] - [% ELSE %] - Item type - [% ItemTypes.GetDescription(result.itemtype) | html %] - [% END %] + Item type + [% ItemTypes.GetDescription(result.itemtype) | html %] + + Collection + [% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %] Checkouts: @@ -150,7 +151,7 @@