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

(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 225-230 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
225
('OpacBrowseResults','1',NULL,'Disable/enable browsing and paging search results from the OPAC detail page.','YesNo'),
225
('OpacBrowseResults','1',NULL,'Disable/enable browsing and paging search results from the OPAC detail page.','YesNo'),
226
('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'),
226
('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'),
227
('opaccolorstylesheet','colors.css','','Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server\'s css directory) or a complete URL beginning with http (if the file lives on a remote server).','free'),
227
('opaccolorstylesheet','colors.css','','Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server\'s css directory) or a complete URL beginning with http (if the file lives on a remote server).','free'),
228
('OpacCustomSearch','','70|10','Replace the search box on the OPAC with the provided HTML','Textarea'),
228
('opaccredits','','70|10','Define HTML Credits at the bottom of the OPAC page','Textarea'),
229
('opaccredits','','70|10','Define HTML Credits at the bottom of the OPAC page','Textarea'),
229
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
230
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
230
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
231
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
Lines 446-448 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
446
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
447
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
447
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
448
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
448
;
449
;
450
INSERT INTO systempreferences (variable,value) VALUES);
(-)a/installer/data/mysql/updatedatabase.pl (+12 lines)
Lines 8560-8565 if ( CheckVersion($DBversion) ) { Link Here
8560
    SetVersion($DBversion);
8560
    SetVersion($DBversion);
8561
}
8561
}
8562
8562
8563
$DBversion = "XXX";
8564
if ( CheckVersion($DBversion) ) {
8565
    $dbh->do(
8566
        q{
8567
INSERT INTO systempreferences (variable,value) VALUES('OpacCustomSearch','');
8568
}
8569
    );
8570
    print
8571
"Upgrade to $DBversion done (Bug 12296 - search box replaceable with a system preference)\n";
8572
    SetVersion($DBversion);
8573
}
8574
8563
=head1 FUNCTIONS
8575
=head1 FUNCTIONS
8564
8576
8565
=head2 TableExists($table)
8577
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+5 lines)
Lines 316-321 OPAC: Link Here
316
            - pref: NoLoginInstructions
316
            - pref: NoLoginInstructions
317
              type: textarea
317
              type: textarea
318
              class: code
318
              class: code
319
        -
320
            - "Replace the search box at the top of OPAC pages with the following HTML:"
321
            - pref: OpacCustomSearch
322
              type: textarea
323
              class: code
319
    Features:
324
    Features:
320
        -
325
        -
321
            - pref: opacuserlogin
326
            - pref: opacuserlogin
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-97 / +101 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
<div id="wrap">
2
<div id="wrap">
2
    <div id="header-region">
3
    <div id="header-region">
3
        <div class="navbar navbar-inverse navbar-static-top">
4
        <div class="navbar navbar-inverse navbar-static-top">
Lines 132-243 Link Here
132
                        [% ELSE %]
133
                        [% ELSE %]
133
                            <div class="mastheadsearch">
134
                            <div class="mastheadsearch">
134
                        [% END %]
135
                        [% END %]
135
                        <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="form-inline">
136
                        [% IF Koha.Preference('OpacCustomSearch') == '' %]
136
                            <label for="masthead_search"> Search
137
                            <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="form-inline">
137
                                [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
138
                                <label for="masthead_search"> Search
138
                                    [% IF ( mylibraryfirst ) %]
139
                                    [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
139
                                        (in [% mylibraryfirst %] only)
140
                                        [% IF ( mylibraryfirst ) %]
141
                                            (in [% mylibraryfirst %] only)
142
                                        [% END %]
140
                                    [% END %]
143
                                    [% END %]
141
                                [% END %]
144
                                </label>
142
                            </label>
143
145
144
                            <select name="idx" id="masthead_search">
146
                                <select name="idx" id="masthead_search">
145
                            [% IF ( ms_kw ) %]
147
                                [% IF ( ms_kw ) %]
146
                                <option selected="selected" value="">Library catalog</option>
148
                                    <option selected="selected" value="">Library catalog</option>
147
                            [% ELSE %]
148
                                <option value="">Library catalog</option>
149
                            [% END # /ms_kw %]
150
                            [% IF ( ms_ti ) %]
151
                                <option selected="selected" value="ti">Title</option>
152
                            [% ELSE %]
153
                                <option value="ti">Title</option>
154
                            [% END # /ms_ti %]
155
                            [% IF ( ms_au ) %]
156
                                <option selected="selected" value="au">Author</option>
157
                            [% ELSE %]
158
                                <option value="au">Author</option>
159
                            [% END # /ms_au%]
160
                            [% IF ( ms_su ) %]
161
                                <option selected="selected" value="su">Subject</option>
162
                            [% ELSE %]
163
                                <option value="su">Subject</option>
164
                            [% END # /ms_su %]
165
                            [% IF ( ms_nb ) %]
166
                                <option selected="selected" value="nb">ISBN</option>
167
                            [% ELSE %]
168
                                <option value="nb">ISBN</option>
169
                            [% END # /ms_nb%]
170
                            [% IF ( ms_se ) %]
171
                                <option selected="selected" value="se">Series</option>
172
                            [% ELSE %]
173
                                <option value="se">Series</option>
174
                            [% END # /ms_se %]
175
                            [% IF ( numbersphr ) %]
176
                                [% IF ( ms_callnum ) %]
177
                                        <option selected="selected" value="callnum,phr">Call number</option>
178
                                [% ELSE %]
149
                                [% ELSE %]
179
                                    <option value="callnum,phr">Call number</option>
150
                                    <option value="">Library catalog</option>
180
                                [% END #/ms_callnum %]
151
                                [% END # /ms_kw %]
181
                            [% ELSE %]
152
                                [% IF ( ms_ti ) %]
182
                                [% IF ( ms_callnum ) %]
153
                                    <option selected="selected" value="ti">Title</option>
183
                                    <option selected="selected" value="callnum">Call number</option>
154
                                [% ELSE %]
155
                                    <option value="ti">Title</option>
156
                                [% END # /ms_ti %]
157
                                [% IF ( ms_au ) %]
158
                                    <option selected="selected" value="au">Author</option>
159
                                [% ELSE %]
160
                                    <option value="au">Author</option>
161
                                [% END # /ms_au%]
162
                                [% IF ( ms_su ) %]
163
                                    <option selected="selected" value="su">Subject</option>
164
                                [% ELSE %]
165
                                    <option value="su">Subject</option>
166
                                [% END # /ms_su %]
167
                                [% IF ( ms_nb ) %]
168
                                    <option selected="selected" value="nb">ISBN</option>
184
                                [% ELSE %]
169
                                [% ELSE %]
185
                                    <option value="callnum">Call number</option>
170
                                    <option value="nb">ISBN</option>
186
                                [% END # /ms_callnum %]
171
                                [% END # /ms_nb%]
187
                            [% END # /numbersphr %]
172
                                [% IF ( ms_se ) %]
188
                            </select>
173
                                    <option selected="selected" value="se">Series</option>
174
                                [% ELSE %]
175
                                    <option value="se">Series</option>
176
                                [% END # /ms_se %]
177
                                [% IF ( numbersphr ) %]
178
                                    [% IF ( ms_callnum ) %]
179
                                            <option selected="selected" value="callnum,phr">Call number</option>
180
                                    [% ELSE %]
181
                                        <option value="callnum,phr">Call number</option>
182
                                    [% END #/ms_callnum %]
183
                                [% ELSE %]
184
                                    [% IF ( ms_callnum ) %]
185
                                        <option selected="selected" value="callnum">Call number</option>
186
                                    [% ELSE %]
187
                                        <option value="callnum">Call number</option>
188
                                    [% END # /ms_callnum %]
189
                                [% END # /numbersphr %]
190
                                </select>
189
191
190
                            [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
192
                                [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
191
                                <div class="input-append nolibrarypulldown">
193
                                    <div class="input-append nolibrarypulldown">
192
                            [% END %]
194
                                [% END %]
193
                            [% IF ( ms_value ) %]
195
                                [% IF ( ms_value ) %]
194
                                <input type="text" title="Type search term" class="transl1" name="q" value="[% ms_value |html %]" /><span id="translControl"></span>
196
                                    <input type="text" title="Type search term" class="transl1" name="q" value="[% ms_value |html %]" /><span id="translControl"></span>
195
                            [% ELSE %]
197
                                [% ELSE %]
196
                                <input type="text" title="Type search term" class="transl1" name="q" /><span id="translControl"></span>
198
                                    <input type="text" title="Type search term" class="transl1" name="q" /><span id="translControl"></span>
197
                            [% END # /ms_value %]
199
                                [% END # /ms_value %]
198
200
199
                            [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
201
                                [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
200
                                <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
202
                                    <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
201
                                </div>
203
                                    </div>
202
                            [% END %]
204
                                [% END %]
203
205
204
                            [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
206
                                [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
205
                                <div class="input-append">
207
                                    <div class="input-append">
206
                                    <select name="branch_group_limit" id="select_library">
208
                                        <select name="branch_group_limit" id="select_library">
207
                                        <option value="">All libraries</option>
209
                                            <option value="">All libraries</option>
208
                                        [% IF BranchCategoriesLoop %]<optgroup label="Libraries">[% END %]
210
                                            [% IF BranchCategoriesLoop %]<optgroup label="Libraries">[% END %]
209
                                            [% FOREACH BranchesLoo IN BranchesLoop %]
211
                                                [% FOREACH BranchesLoo IN BranchesLoop %]
210
                                                [% IF ( BranchesLoo.selected ) %]<option selected="selected" value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>
212
                                                    [% IF ( BranchesLoo.selected ) %]<option selected="selected" value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>
211
                                                [% ELSE %]<option value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>[% END %]
213
                                                    [% ELSE %]<option value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>[% END %]
212
                                            [% END %]
213
                                        [% IF BranchCategoriesLoop %]
214
                                            </optgroup>
215
                                            <optgroup label="Groups">
216
                                                [% FOREACH bc IN BranchCategoriesLoop %]
217
                                                    [% IF ( bc.selected ) %]
218
                                                        <option selected="selected" value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
219
                                                    [% ELSE %]
220
                                                        <option value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
221
                                                    [% END # / bc.selected %]
222
                                                [% END %]
214
                                                [% END %]
223
                                            </optgroup>
215
                                            [% IF BranchCategoriesLoop %]
224
                                        [% END # / BranchCategoriesLoop %]
216
                                                </optgroup>
225
                                    </select>
217
                                                <optgroup label="Groups">
226
                                    <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
218
                                                    [% FOREACH bc IN BranchCategoriesLoop %]
227
                                </div>
219
                                                        [% IF ( bc.selected ) %]
228
                            [% ELSE %]
220
                                                            <option selected="selected" value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
229
                                [% IF ( opac_limit_override ) %]
221
                                                        [% ELSE %]
230
                                    [% IF ( opac_search_limit ) %]
222
                                                            <option value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
231
                                        <input name="limit" value="[% opac_search_limit %]" type="hidden" />
223
                                                        [% END # / bc.selected %]
232
                                    [% END %]
224
                                                    [% END %]
225
                                                </optgroup>
226
                                            [% END # / BranchCategoriesLoop %]
227
                                        </select>
228
                                        <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
229
                                    </div>
233
                                [% ELSE %]
230
                                [% ELSE %]
234
                                    [% IF ( mylibraryfirst ) %]
231
                                    [% IF ( opac_limit_override ) %]
235
                                        <input name="limit" value="branch:[% mylibraryfirst %]" type="hidden" />
232
                                        [% IF ( opac_search_limit ) %]
236
                                    [% END %]
233
                                            <input name="limit" value="[% opac_search_limit %]" type="hidden" />
237
                                [% END # / opac_limit_override %]
234
                                        [% END %]
238
                            [% END # / OpacAddMastheadLibraryPulldown %]
235
                                    [% ELSE %]
236
                                        [% IF ( mylibraryfirst ) %]
237
                                            <input name="limit" value="branch:[% mylibraryfirst %]" type="hidden" />
238
                                        [% END %]
239
                                    [% END # / opac_limit_override %]
240
                                [% END # / OpacAddMastheadLibraryPulldown %]
239
241
240
                        </form>
242
                            </form>
243
                        [% ELSE # / Koha.Preference('OpacCustomSearch') == '' %]
244
                            [% Koha.Preference('OpacCustomSearch') %]
245
                        [% END # / Koha.Preference('OpacCustomSearch') == '' %]
241
                        </div> <!-- / .mastheadsearch -->
246
                        </div> <!-- / .mastheadsearch -->
242
                    [% END # / UNLESS advsearch %]
247
                    [% END # / UNLESS advsearch %]
243
248
244
- 

Return to bug 12296