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

(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 216-221 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
216
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
216
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
217
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
217
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
218
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
218
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
219
('OpacAdvSearchMoreOptions','pubdate|itemtype|language|subtype|sorting|location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
220
('OpacAdvSearchOptions','pubdate|itemtype|language|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
219
('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'),
221
('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'),
220
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
222
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
221
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
223
('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 8751-8756 if ( CheckVersion($DBversion) ) { Link Here
8751
    SetVersion($DBversion);
8751
    SetVersion($DBversion);
8752
}
8752
}
8753
8753
8754
$DBversion = "3.17.00.XXX";
8755
if ( CheckVersion($DBversion) ) {
8756
    $dbh->do(q{
8757
        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');
8758
    });
8759
8760
    $dbh->do(q{
8761
        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');
8762
   });
8763
   print "Upgrade to $DBversion done (Bug 9043: Add system preference OpacAdvSearchOptions and OpacAdvSearchMoreOptions)\n";
8764
   SetVersion ($DBversion);
8765
}
8766
8754
=head1 FUNCTIONS
8767
=head1 FUNCTIONS
8755
8768
8756
=head2 TableExists($table)
8769
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+21 lines)
Lines 660-662 OPAC: Link Here
660
            - pref: PatronSelfRegistrationAdditionalInstructions
660
            - pref: PatronSelfRegistrationAdditionalInstructions
661
              type: textarea
661
              type: textarea
662
              class: html
662
              class: html
663
    Advanced Search Options:
664
        -
665
            - Show search options
666
            - pref: OpacAdvSearchOptions
667
              multiple:
668
                pubdate: Publication date
669
                itemtype: Item types
670
                language: Language
671
                subtype: Subtypes
672
                sorting: Sorting
673
                location: Location and availability
674
        -
675
            - Show search options for the expanded view
676
            - pref: OpacAdvSearchMoreOptions
677
              multiple:
678
                pubdate: Publication date
679
                itemtype: Item types
680
                language: Language
681
                subtype: Subtypes
682
                sorting: Sorting
683
                location: Location and availability
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-3 / +17 lines)
Lines 120-125 Link Here
120
    <div class="main">
120
    <div class="main">
121
        <div class="container-fluid">
121
        <div class="container-fluid">
122
            <div class="row-fluid">
122
            <div class="row-fluid">
123
              [% IF ( ( OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
123
                <div class="span12">
124
                <div class="span12">
124
                    <div id="advsearches" class="toptabs">
125
                    <div id="advsearches" class="toptabs">
125
                        <ul>
126
                        <ul>
Lines 150-157 Link Here
150
                        [% END # / FOREACH advancedsearchesloop %]
151
                        [% END # / FOREACH advancedsearchesloop %]
151
                    </div> <!-- / #advsearches -->
152
                    </div> <!-- / #advsearches -->
152
                </div> <!-- / .span12 -->
153
                </div> <!-- / .span12 -->
154
              [% END %]
153
155
154
                <div class="row-fluid">
156
                <div class="row-fluid">
157
                  [% IF ( ( OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %]
155
                    <div class="span3">
158
                    <div class="span3">
156
                        <div id="pubrange">
159
                        <div id="pubrange">
157
                            <!-- PUB RANGE OPTION -->
160
                            <!-- PUB RANGE OPTION -->
Lines 164-170 Link Here
164
                            <!-- /PUB RANGE OPTION -->
167
                            <!-- /PUB RANGE OPTION -->
165
                        </div>
168
                        </div>
166
                    </div>
169
                    </div>
170
                  [% END %]
167
171
172
                  [% IF ( ( OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %]
168
                    <div class="span3">
173
                    <div class="span3">
169
                        <div id="langfilter">
174
                        <div id="langfilter">
170
                            <fieldset>
175
                            <fieldset>
Lines 187-193 Link Here
187
                            </fieldset>
192
                            </fieldset>
188
                        </div> <!-- / #langfilter -->
193
                        </div> <!-- / #langfilter -->
189
                    </div> <!-- / .span3 -->
194
                    </div> <!-- / .span3 -->
195
                  [% END %]
190
196
197
                  [% IF ( ( OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %]
191
                    [% UNLESS ( singleBranchMode ) %]
198
                    [% UNLESS ( singleBranchMode ) %]
192
                        <div class="span3">
199
                        <div class="span3">
193
                            <!-- AVAILABILITY LIMITS -->
200
                            <!-- AVAILABILITY LIMITS -->
Lines 223-229 Link Here
223
                            <!-- /AVAILABILITY LIMITS -->
230
                            <!-- /AVAILABILITY LIMITS -->
224
                        </div> <!-- / .span3 -->
231
                        </div> <!-- / .span3 -->
225
                    [% END # / UNLESS singleBranchMode %]
232
                    [% END # / UNLESS singleBranchMode %]
233
                  [% END %]
226
234
235
                  [% IF ( ( OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %]
227
                    <div class="span3">
236
                    <div class="span3">
228
                    <!-- RANK LIMITS -->
237
                    <!-- RANK LIMITS -->
229
                        <div id="sortby">
238
                        <div id="sortby">
Lines 237-245 Link Here
237
                        </div>
246
                        </div>
238
                    <!-- RANK LIMITS -->
247
                    <!-- RANK LIMITS -->
239
                    </div> <!-- / .span3 -->
248
                    </div> <!-- / .span3 -->
249
                  [% END %]
240
                </div> <!-- / .row-fluid -->
250
                </div> <!-- / .row-fluid -->
241
251
242
                [% IF ( expanded_options ) %]
252
                [% IF ( ( OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %]
243
                    <div class="row-fluid">
253
                    <div class="row-fluid">
244
                        [% IF ( usmarc ) %]
254
                        [% IF ( usmarc ) %]
245
                            <!-- SUBTYPE LIMITS -->
255
                            <!-- SUBTYPE LIMITS -->
Lines 340-345 Link Here
340
        </div> <!-- / .container-fluid -->
350
        </div> <!-- / .container-fluid -->
341
    </div> <!-- / .main -->
351
    </div> <!-- / .main -->
342
352
353
    [% IF ( OpacAdvSearchMoreOptions.size > 0 and expanded_options ) or ( OpacAdvSearchOptions.size > 0 and not expanded_options ) %]
343
        <div class="container-fluid">
354
        <div class="container-fluid">
344
            <div class="row-fluid">
355
            <div class="row-fluid">
345
                <div class="span12">
356
                <div class="span12">
Lines 351-367 Link Here
351
                </div> <!-- / .span12 -->
362
                </div> <!-- / .span12 -->
352
            </div> <!-- / .row-fluid -->
363
            </div> <!-- / .row-fluid -->
353
        </div> <!-- / .container-fluid -->
364
        </div> <!-- / .container-fluid -->
365
    [% END %]
354
</form>
366
</form>
355
367
356
[% INCLUDE 'opac-bottom.inc' %]
368
[% INCLUDE 'opac-bottom.inc' %]
357
[% BLOCK searchbuttons %]
369
[% BLOCK searchbuttons %]
358
    <p>
370
    <p>
359
        <input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
371
        <input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
360
        [% IF ( expanded_options ) %]
372
373
        [% IF expanded_options %]
361
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0" class="btn btn-default more-less-options">Fewer options</a>
374
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0" class="btn btn-default more-less-options">Fewer options</a>
362
        [% ELSE %]
375
        [% ELSIF not expanded_options %]
363
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1" class="btn btn-default more-less-options">More options</a>
376
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1" class="btn btn-default more-less-options">More options</a>
364
        [% END %]
377
        [% END %]
378
365
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear" class="btn btn-default new-search">New search</a>
379
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear" class="btn btn-default new-search">New search</a>
366
    </p>
380
    </p>
367
[% END %]
381
[% END %]
(-)a/opac/opac-search.pl (-4 / +11 lines)
Lines 315-323 if ( $template_type && $template_type eq 'advsearch' ) { Link Here
315
        }
315
        }
316
316
317
    }
317
    }
318
    $template->param(uc(    C4::Context->preference("marcflavour")) => 1,   # we already did this for UNIMARC
318
319
                            advsearch => 1,
319
    my @advsearch_limits = split /\|/, C4::Context->preference('OpacAdvSearchOptions');
320
                            search_boxes_loop => \@search_boxes_array);
320
    my @advsearch_more_limits = split /\|/,
321
      C4::Context->preference('OpacAdvSearchMoreOptions');
322
    $template->param(
323
        uc( C4::Context->preference("marcflavour") ) => 1,    # we already did this for UNIMARC
324
        advsearch         => 1,
325
        search_boxes_loop => \@search_boxes_array,
326
        OpacAdvSearchOptions     => \@advsearch_limits,
327
        OpacAdvSearchMoreOptions => \@advsearch_more_limits,
328
    );
321
329
322
    # use the global setting by default
330
    # use the global setting by default
323
    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
331
    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
324
- 

Return to bug 9043