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

(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 222-227 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
222
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
222
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
223
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
223
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
224
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
224
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
225
('OpacAdvSearchMoreOptions','pubdate|itemtype|language|subtype|sorting|location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
226
('OpacAdvSearchOptions','pubdate|itemtype|language|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
225
('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'),
227
('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'),
226
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
228
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
227
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
229
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+13 lines)
Lines 9418-9423 if ( CheckVersion($DBversion) ) { Link Here
9418
    SetVersion($DBversion);
9418
    SetVersion($DBversion);
9419
}
9419
}
9420
9420
9421
$DBversion = "3.17.00.XXX";
9422
if ( CheckVersion($DBversion) ) {
9423
    $dbh->do(q{
9424
        INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchOptions','pubdate|itemtype|language|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple');
9425
    });
9426
9427
    $dbh->do(q{
9428
        INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearchMoreOptions','pubdate|itemtype|language|subtype|sorting|location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple');
9429
   });
9430
   print "Upgrade to $DBversion done (Bug 9043: Add system preference OpacAdvSearchOptions and OpacAdvSearchMoreOptions)\n";
9431
   SetVersion ($DBversion);
9432
}
9433
9421
=head1 FUNCTIONS
9434
=head1 FUNCTIONS
9422
9435
9423
=head2 TableExists($table)
9436
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+21 lines)
Lines 656-658 OPAC: Link Here
656
            - pref: PatronSelfRegistrationAdditionalInstructions
656
            - pref: PatronSelfRegistrationAdditionalInstructions
657
              type: textarea
657
              type: textarea
658
              class: html
658
              class: html
659
    Advanced Search Options:
660
        -
661
            - Show search options
662
            - pref: OpacAdvSearchOptions
663
              multiple:
664
                pubdate: Publication date
665
                itemtype: Item types
666
                language: Language
667
                subtype: Subtypes
668
                sorting: Sorting
669
                location: Location and availability
670
        -
671
            - Show search options for the expanded view
672
            - pref: OpacAdvSearchMoreOptions
673
              multiple:
674
                pubdate: Publication date
675
                itemtype: Item types
676
                language: Language
677
                subtype: Subtypes
678
                sorting: Sorting
679
                location: Location and availability
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-4 / +17 lines)
Lines 111-116 Link Here
111
                    </div>
111
                    </div>
112
112
113
            <div class="row-fluid">
113
            <div class="row-fluid">
114
              [% IF ( ( OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
114
                <div class="span12">
115
                <div class="span12">
115
                    <div id="advsearches" class="toptabs">
116
                    <div id="advsearches" class="toptabs">
116
                        <ul>
117
                        <ul>
Lines 141-148 Link Here
141
                        [% END # / FOREACH advancedsearchesloop %]
142
                        [% END # / FOREACH advancedsearchesloop %]
142
                    </div> <!-- / #advsearches -->
143
                    </div> <!-- / #advsearches -->
143
                </div> <!-- / .span12 -->
144
                </div> <!-- / .span12 -->
145
              [% END %]
144
146
145
                <div class="row-fluid">
147
                <div class="row-fluid">
148
                  [% IF ( ( OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %]
146
                    <div class="span3">
149
                    <div class="span3">
147
                        <div id="pubrange">
150
                        <div id="pubrange">
148
                            <!-- PUB RANGE OPTION -->
151
                            <!-- PUB RANGE OPTION -->
Lines 155-161 Link Here
155
                            <!-- /PUB RANGE OPTION -->
158
                            <!-- /PUB RANGE OPTION -->
156
                        </div>
159
                        </div>
157
                    </div>
160
                    </div>
161
                  [% END %]
158
162
163
                  [% IF ( ( OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %]
159
                    <div class="span3">
164
                    <div class="span3">
160
                        <div id="langfilter">
165
                        <div id="langfilter">
161
                            <fieldset>
166
                            <fieldset>
Lines 178-184 Link Here
178
                            </fieldset>
183
                            </fieldset>
179
                        </div> <!-- / #langfilter -->
184
                        </div> <!-- / #langfilter -->
180
                    </div> <!-- / .span3 -->
185
                    </div> <!-- / .span3 -->
186
                  [% END %]
181
187
188
                  [% IF ( ( OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %]
182
                    [% UNLESS ( singleBranchMode ) %]
189
                    [% UNLESS ( singleBranchMode ) %]
183
                        <div class="span3">
190
                        <div class="span3">
184
                            <!-- AVAILABILITY LIMITS -->
191
                            <!-- AVAILABILITY LIMITS -->
Lines 214-220 Link Here
214
                            <!-- /AVAILABILITY LIMITS -->
221
                            <!-- /AVAILABILITY LIMITS -->
215
                        </div> <!-- / .span3 -->
222
                        </div> <!-- / .span3 -->
216
                    [% END # / UNLESS singleBranchMode %]
223
                    [% END # / UNLESS singleBranchMode %]
224
                  [% END %]
217
225
226
                  [% IF ( ( OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %]
218
                    <div class="span3">
227
                    <div class="span3">
219
                    <!-- RANK LIMITS -->
228
                    <!-- RANK LIMITS -->
220
                        <div id="sortby">
229
                        <div id="sortby">
Lines 228-236 Link Here
228
                        </div>
237
                        </div>
229
                    <!-- RANK LIMITS -->
238
                    <!-- RANK LIMITS -->
230
                    </div> <!-- / .span3 -->
239
                    </div> <!-- / .span3 -->
240
                  [% END %]
231
                </div> <!-- / .row-fluid -->
241
                </div> <!-- / .row-fluid -->
232
242
233
                [% IF ( expanded_options ) %]
243
                [% IF ( ( OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %]
234
                    <div class="row-fluid">
244
                    <div class="row-fluid">
235
                        [% IF ( usmarc ) %]
245
                        [% IF ( usmarc ) %]
236
                            <!-- SUBTYPE LIMITS -->
246
                            <!-- SUBTYPE LIMITS -->
Lines 330-335 Link Here
330
                [% END # / IF expanded_options %]
340
                [% END # / IF expanded_options %]
331
            </div> <!-- / .row-fluid -->
341
            </div> <!-- / .row-fluid -->
332
342
343
        [% IF ( OpacAdvSearchMoreOptions.size > 0 and expanded_options ) or ( OpacAdvSearchOptions.size > 0 and not expanded_options ) %]
333
            <div class="row-fluid">
344
            <div class="row-fluid">
334
                <div class="span12">
345
                <div class="span12">
335
                    <div class="text-center">
346
                    <div class="text-center">
Lines 339-345 Link Here
339
                    </div>
350
                    </div>
340
                </div> <!-- / .span12 -->
351
                </div> <!-- / .span12 -->
341
            </div> <!-- / .row-fluid -->
352
            </div> <!-- / .row-fluid -->
342
        </div> <!-- / .container-fluid -->
353
        [% END %]
343
   </div> <!-- / .main -->
354
   </div> <!-- / .main -->
344
</form>
355
</form>
345
356
Lines 347-357 Link Here
347
[% BLOCK searchbuttons %]
358
[% BLOCK searchbuttons %]
348
    <p>
359
    <p>
349
        <input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
360
        <input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
350
        [% IF ( expanded_options ) %]
361
362
        [% IF expanded_options %]
351
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0" class="btn btn-default more-less-options">Fewer options</a>
363
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0" class="btn btn-default more-less-options">Fewer options</a>
352
        [% ELSE %]
364
        [% ELSIF not expanded_options %]
353
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1" class="btn btn-default more-less-options">More options</a>
365
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1" class="btn btn-default more-less-options">More options</a>
354
        [% END %]
366
        [% END %]
367
355
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear" class="btn btn-default new-search">New search</a>
368
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear" class="btn btn-default new-search">New search</a>
356
    </p>
369
    </p>
357
[% END %]
370
[% END %]
(-)a/opac/opac-search.pl (-4 / +11 lines)
Lines 306-314 if ( $template_type && $template_type eq 'advsearch' ) { Link Here
306
        }
306
        }
307
307
308
    }
308
    }
309
    $template->param(uc(    C4::Context->preference("marcflavour")) => 1,   # we already did this for UNIMARC
309
310
                            advsearch => 1,
310
    my @advsearch_limits = split /\|/, C4::Context->preference('OpacAdvSearchOptions');
311
                            search_boxes_loop => \@search_boxes_array);
311
    my @advsearch_more_limits = split /\|/,
312
      C4::Context->preference('OpacAdvSearchMoreOptions');
313
    $template->param(
314
        uc( C4::Context->preference("marcflavour") ) => 1,    # we already did this for UNIMARC
315
        advsearch         => 1,
316
        search_boxes_loop => \@search_boxes_array,
317
        OpacAdvSearchOptions     => \@advsearch_limits,
318
        OpacAdvSearchMoreOptions => \@advsearch_more_limits,
319
    );
312
320
313
    # use the global setting by default
321
    # use the global setting by default
314
    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
322
    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
315
- 

Return to bug 9043