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 (+6 lines)
Lines 876-881 OPAC: Link Here
876
                subtype: Subtypes
876
                subtype: Subtypes
877
                sorting: Sorting
877
                sorting: Sorting
878
                location: Location and availability
878
                location: Location and availability
879
        -
880
            - Show tabs in the OPAC advanced search for limiting searches on the
881
            - pref: OpacAdvancedSearchTypes
882
              class: long
883
            - "fields (separate values with |). Tabs appear in the order listed.<br/>"
884
            - "<em>Currently supported values</em>: Item types (<strong>itemtypes</strong>), Collection, (<strong>ccode</strong>) and Shelving Location (<strong>loc</strong>)."
879
    Authentication:
885
    Authentication:
880
        -
886
        -
881
            - pref: OPACShibOnly
887
            - pref: OPACShibOnly
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (-2 / +2 lines)
Lines 96-106 Searching: Link Here
96
                   0: "Don't add"
96
                   0: "Don't add"
97
            - search history of the unlogged user to the next patron logging in.
97
            - search history of the unlogged user to the next patron logging in.
98
        -
98
        -
99
            - Show tabs in the OPAC and staff interface advanced search for limiting searches on the
99
            - Show tabs in the staff interface advanced search for limiting searches on the
100
            - pref: AdvancedSearchTypes
100
            - pref: AdvancedSearchTypes
101
              class: long
101
              class: long
102
            - "fields (separate values with |). Tabs appear in the order listed.<br/>"
102
            - "fields (separate values with |). Tabs appear in the order listed.<br/>"
103
            - "<em>Currently supported values</em>: Item types (<strong>itemtypes</strong>), Collection Codes (<strong>ccode</strong>) and Shelving Location (<strong>loc</strong>)."
103
            - "<em>Currently supported values</em>: Item types (<strong>itemtypes</strong>), Collection, (<strong>ccode</strong>) and Shelving Location (<strong>loc</strong>)."
104
        -
104
        -
105
            - Limit the languages listed in the advanced search drop-down to the
105
            - Limit the languages listed in the advanced search drop-down to the
106
            - pref: AdvancedSearchLanguages
106
            - pref: AdvancedSearchLanguages
(-)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