View | Details | Raw Unified | Return to bug 17018
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug-17018.pl (+13 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "17018",
5
    description => "Split AdvancedSearchTypes for staff and OPAC",
6
    up => sub {
7
        my ($args) = @_;
8
        my $dbh = $args->{dbh};
9
10
        $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'" );
11
12
    },
13
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 389-394 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
389
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
389
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
390
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
390
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
391
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
391
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
392
('OpacAdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields are available as limits on the OPAC advanced search page','Choice'),
392
('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'),
393
('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'),
393
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
394
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
394
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
395
('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 (+8 lines)
Lines 880-885 OPAC: Link Here
880
                subtype: Subtypes
880
                subtype: Subtypes
881
                sorting: Sorting
881
                sorting: Sorting
882
                location: Location and availability
882
                location: Location and availability
883
        -
884
            - Show tabs in the OPAC advanced search for limiting searches by
885
            - pref: OpacAdvancedSearchTypes
886
              multiple:
887
                itemtypes: Item type
888
                ccode: Collection
889
                loc: Shelving location
890
            - "Tabs appear in the order listed.<br/>"
883
    Authentication:
891
    Authentication:
884
        -
892
        -
885
            - pref: OPACShibOnly
893
            - pref: OPACShibOnly
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc (-3 / +3 lines)
Lines 25-32 Link Here
25
                            </select></li>
25
                            </select></li>
26
                [% END %]
26
                [% END %]
27
27
28
                [% AdvancedSearchTypes = Koha.Preference('AdvancedSearchTypes').split('\|') %]
28
                [% OpacAdvancedSearchTypes = Koha.Preference('OpacAdvancedSearchTypes').split(',') %]
29
                [% IF AdvancedSearchTypes.grep('^itemtypes$').size %]
29
                [% IF OpacAdvancedSearchTypes.grep('^itemtypes$').size %]
30
                    <li>
30
                    <li>
31
                        <label for="itemtype">Limit to: </label>
31
                        <label for="itemtype">Limit to: </label>
32
                        <select name="itemtype" id="itemtype">
32
                        <select name="itemtype" id="itemtype">
Lines 44-50 Link Here
44
                    </li>
44
                    </li>
45
                [% END %]
45
                [% END %]
46
46
47
                [% IF AdvancedSearchTypes.grep('^ccode$').size %]
47
                [% IF OpacAdvancedSearchTypes.grep('^ccode$').size %]
48
                    <li>
48
                    <li>
49
                        <label for="ccode">Limit to:</label>
49
                        <label for="ccode">Limit to:</label>
50
                        <select name="ccode" id="ccode">
50
                        <select name="ccode" id="ccode">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-1 / +1 lines)
Lines 110-116 Link Here
110
                                                    [% IF ( result.item('size') ) %][% result.item('size') | html %][% END %]</p>
110
                                                    [% IF ( result.item('size') ) %][% result.item('size') | html %][% END %]</p>
111
                                            </td>
111
                                            </td>
112
                                            <td>
112
                                            <td>
113
                                                [% IF Koha.Preference('AdvancedSearchTypes') == 'ccode' %]
113
                                                [% IF Koha.Preference('OpacAdvancedSearchTypes') == 'ccode' %]
114
                                                    <span class="tdlabel">Collection</span>
114
                                                    <span class="tdlabel">Collection</span>
115
                                                    [% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %]
115
                                                    [% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %]
116
                                                [% ELSE %]
116
                                                [% ELSE %]
(-)a/opac/opac-search.pl (-1 / +1 lines)
Lines 239-245 foreach my $itemtype ( keys %{$itemtypes} ) { Link Here
239
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
239
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
240
my @advancedsearchesloop;
240
my @advancedsearchesloop;
241
my $cnt;
241
my $cnt;
242
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
242
my $advanced_search_types = C4::Context->preference("OpacAdvancedSearchTypes") || "itemtypes";
243
my @advanced_search_types = split(/\,/, $advanced_search_types);
243
my @advanced_search_types = split(/\,/, $advanced_search_types);
244
244
245
my $hidingrules = C4::Context->yaml_preference('OpacHiddenItems') // {};
245
my $hidingrules = C4::Context->yaml_preference('OpacHiddenItems') // {};
(-)a/opac/opac-topissues.pl (-2 / +1 lines)
Lines 64-70 if (!$do_it && C4::Context->userenv && C4::Context->userenv->{'branch'} ) { Link Here
64
}
64
}
65
my $itemtype = $input->param('itemtype') || '';
65
my $itemtype = $input->param('itemtype') || '';
66
my $timeLimit = $input->param('timeLimit') || 3;
66
my $timeLimit = $input->param('timeLimit') || 3;
67
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
67
my $advanced_search_types = C4::Context->preference('OpacAdvancedSearchTypes');
68
my @advanced_search_types = split /\|/, $advanced_search_types;
68
my @advanced_search_types = split /\|/, $advanced_search_types;
69
69
70
my $params = {
70
my $params = {
71
- 

Return to bug 17018