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

(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 206-211 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
206
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
206
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
207
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
207
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
208
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
208
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
209
('OpacAdvSearchMoreOptions','pubdate|itemtype|language|subtype|sorting|location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
210
('OpacAdvSearchOptions','pubdate|itemtype|language|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
209
('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'),
211
('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'),
210
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
212
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
211
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
213
('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 8202-8207 if ( CheckVersion($DBversion) ) { Link Here
8202
    SetVersion($DBversion);
8202
    SetVersion($DBversion);
8203
}
8203
}
8204
8204
8205
$DBversion = "3.15.00.XXX";
8206
if ( CheckVersion($DBversion) ) {
8207
    $dbh->do(q{
8208
        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');
8209
    });
8210
8211
    $dbh->do(q{
8212
        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');
8213
   });
8214
   print "Upgrade to $DBversion done (Bug 9043: Add system preference OpacAdvSearchOptions and OpacAdvSearchMoreOptions)\n";
8215
   SetVersion ($DBversion);
8216
}
8217
8205
=head1 FUNCTIONS
8218
=head1 FUNCTIONS
8206
8219
8207
=head2 TableExists($table)
8220
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+21 lines)
Lines 639-641 OPAC: Link Here
639
            - pref: PatronSelfRegistrationAdditionalInstructions
639
            - pref: PatronSelfRegistrationAdditionalInstructions
640
              type: textarea
640
              type: textarea
641
              class: html
641
              class: html
642
    Advanced Search Options:
643
        -
644
            - Show search options
645
            - pref: OpacAdvSearchOptions
646
              multiple:
647
                pubdate: Publication date
648
                itemtype: Item types
649
                language: Language
650
                subtype: Subtypes
651
                sorting: Sorting
652
                location: Location
653
        -
654
            - Show search options for the expanded view
655
            - pref: OpacAdvSearchMoreOptions
656
              multiple:
657
                pubdate: Publication date
658
                itemtype: Item types
659
                language: Language
660
                subtype: Subtypes
661
                sorting: Sorting
662
                location: Location
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-4 / +17 lines)
Lines 121-126 Link Here
121
    <div class="main">
121
    <div class="main">
122
        <div class="container-fluid">
122
        <div class="container-fluid">
123
            <div class="row-fluid">
123
            <div class="row-fluid">
124
              [% IF ( ( OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
124
                <div class="span12">
125
                <div class="span12">
125
                    <div id="advsearches" class="toptabs">
126
                    <div id="advsearches" class="toptabs">
126
                        <ul>
127
                        <ul>
Lines 151-158 Link Here
151
                        [% END # / FOREACH advancedsearchesloop %]
152
                        [% END # / FOREACH advancedsearchesloop %]
152
                    </div> <!-- / #advsearches -->
153
                    </div> <!-- / #advsearches -->
153
                </div> <!-- / .span12 -->
154
                </div> <!-- / .span12 -->
155
              [% END %]
154
156
155
                <div class="row-fluid">
157
                <div class="row-fluid">
158
                  [% IF ( ( OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %]
156
                    <div class="span3">
159
                    <div class="span3">
157
                        <div id="pubrange">
160
                        <div id="pubrange">
158
                            <!-- PUB RANGE OPTION -->
161
                            <!-- PUB RANGE OPTION -->
Lines 165-171 Link Here
165
                            <!-- /PUB RANGE OPTION -->
168
                            <!-- /PUB RANGE OPTION -->
166
                        </div>
169
                        </div>
167
                    </div>
170
                    </div>
171
                  [% END %]
168
172
173
                  [% IF ( ( OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %]
169
                    <div class="span3">
174
                    <div class="span3">
170
                        <div id="langfilter">
175
                        <div id="langfilter">
171
                            <fieldset>
176
                            <fieldset>
Lines 188-194 Link Here
188
                            </fieldset>
193
                            </fieldset>
189
                        </div> <!-- / #langfilter -->
194
                        </div> <!-- / #langfilter -->
190
                    </div> <!-- / .span3 -->
195
                    </div> <!-- / .span3 -->
196
                  [% END %]
191
197
198
                  [% IF ( ( OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %]
192
                    [% UNLESS ( singleBranchMode ) %]
199
                    [% UNLESS ( singleBranchMode ) %]
193
                        <div class="span3">
200
                        <div class="span3">
194
                            <!-- AVAILABILITY LIMITS -->
201
                            <!-- AVAILABILITY LIMITS -->
Lines 224-230 Link Here
224
                            <!-- /AVAILABILITY LIMITS -->
231
                            <!-- /AVAILABILITY LIMITS -->
225
                        </div> <!-- / .span3 -->
232
                        </div> <!-- / .span3 -->
226
                    [% END # / UNLESS singleBranchMode %]
233
                    [% END # / UNLESS singleBranchMode %]
234
                  [% END %]
227
235
236
                  [% IF ( ( OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %]
228
                    <div class="span3">
237
                    <div class="span3">
229
                    <!-- RANK LIMITS -->
238
                    <!-- RANK LIMITS -->
230
                        <div id="sortby">
239
                        <div id="sortby">
Lines 238-246 Link Here
238
                        </div>
247
                        </div>
239
                    <!-- RANK LIMITS -->
248
                    <!-- RANK LIMITS -->
240
                    </div> <!-- / .span3 -->
249
                    </div> <!-- / .span3 -->
250
                  [% END %]
241
                </div> <!-- / .row-fluid -->
251
                </div> <!-- / .row-fluid -->
242
252
243
                [% IF ( expanded_options ) %]
253
                [% IF ( ( OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %]
244
                    <div class="row-fluid">
254
                    <div class="row-fluid">
245
                        [% IF ( usmarc ) %]
255
                        [% IF ( usmarc ) %]
246
                            <!-- SUBTYPE LIMITS -->
256
                            <!-- SUBTYPE LIMITS -->
Lines 341-346 Link Here
341
        </div> <!-- / .container-fluid -->
351
        </div> <!-- / .container-fluid -->
342
    </div> <!-- / .main -->
352
    </div> <!-- / .main -->
343
353
354
    [% IF ( OpacAdvSearchMoreOptions.size > 0 and expanded_options ) or ( OpacAdvSearchOptions.size > 0 and not expanded_options ) %]
344
        <div class="container-fluid">
355
        <div class="container-fluid">
345
            <div class="row-fluid">
356
            <div class="row-fluid">
346
                <div class="span12">
357
                <div class="span12">
Lines 352-366 Link Here
352
                </div> <!-- / .span12 -->
363
                </div> <!-- / .span12 -->
353
            </div> <!-- / .row-fluid -->
364
            </div> <!-- / .row-fluid -->
354
        </div> <!-- / .container-fluid -->
365
        </div> <!-- / .container-fluid -->
366
    [% END %]
355
</form>
367
</form>
356
368
357
[% INCLUDE 'opac-bottom.inc' %]
369
[% INCLUDE 'opac-bottom.inc' %]
358
[% BLOCK searchbuttons %]
370
[% BLOCK searchbuttons %]
359
    <p>
371
    <p>
360
        <input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
372
        <input class="btn btn-success" type="submit" accesskey="s" name="do" title="Search" value="Search" />
361
        [% IF ( expanded_options ) %]
373
374
        [% IF expanded_options %]
362
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
375
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
363
        [% ELSE %]
376
        [% ELSIF not expanded_options %]
364
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
377
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
365
        [% END %]
378
        [% END %]
366
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
379
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
Lines 392-395 Link Here
392
    });
405
    });
393
    //]]>
406
    //]]>
394
</script>
407
</script>
395
[% END %]
408
[% END %]
(-)a/opac/opac-search.pl (-4 / +11 lines)
Lines 295-303 if ( $template_type && $template_type eq 'advsearch' ) { Link Here
295
        }
295
        }
296
296
297
    }
297
    }
298
    $template->param(uc(    C4::Context->preference("marcflavour")) => 1,   # we already did this for UNIMARC
298
299
                            advsearch => 1,
299
    my @advsearch_limits = split /\|/, C4::Context->preference('OpacAdvSearchOptions');
300
                            search_boxes_loop => \@search_boxes_array);
300
    my @advsearch_more_limits = split /\|/,
301
      C4::Context->preference('OpacAdvSearchMoreOptions');
302
    $template->param(
303
        uc( C4::Context->preference("marcflavour") ) => 1,    # we already did this for UNIMARC
304
        advsearch         => 1,
305
        search_boxes_loop => \@search_boxes_array,
306
        OpacAdvSearchOptions     => \@advsearch_limits,
307
        OpacAdvSearchMoreOptions => \@advsearch_more_limits,
308
    );
301
309
302
    # use the global setting by default
310
    # use the global setting by default
303
    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
311
    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
304
- 

Return to bug 9043