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

(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 213-218 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
213
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
213
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
214
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
214
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
215
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
215
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
216
('OpacAdvSearchMoreOptions','pubdate|itemtype|language|subtype|sorting|location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
217
('OpacAdvSearchOptions','pubdate|itemtype|language|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
216
('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'),
218
('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'),
217
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
219
('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'),
218
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
220
('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+19 lines)
Lines 8577-8582 if ( CheckVersion($DBversion) ) { Link Here
8577
    SetVersion ($DBversion);
8577
    SetVersion ($DBversion);
8578
}
8578
}
8579
8579
8580
8581
8582
8583
8584
8585
8586
$DBversion = "3.17.00.XXX";
8587
if ( CheckVersion($DBversion) ) {
8588
    $dbh->do(q{
8589
        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');
8590
    });
8591
8592
    $dbh->do(q{
8593
        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');
8594
   });
8595
   print "Upgrade to $DBversion done (Bug 9043: Add system preference OpacAdvSearchOptions and OpacAdvSearchMoreOptions)\n";
8596
   SetVersion ($DBversion);
8597
}
8598
8580
=head1 FUNCTIONS
8599
=head1 FUNCTIONS
8581
8600
8582
=head2 TableExists($table)
8601
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+21 lines)
Lines 663-665 OPAC: Link Here
663
            - pref: PatronSelfRegistrationAdditionalInstructions
663
            - pref: PatronSelfRegistrationAdditionalInstructions
664
              type: textarea
664
              type: textarea
665
              class: html
665
              class: html
666
    Advanced Search Options:
667
        -
668
            - Show search options
669
            - pref: OpacAdvSearchOptions
670
              multiple:
671
                pubdate: Publication date
672
                itemtype: Item types
673
                language: Language
674
                subtype: Subtypes
675
                sorting: Sorting
676
                location: Location and availability
677
        -
678
            - Show search options for the expanded view
679
            - pref: OpacAdvSearchMoreOptions
680
              multiple:
681
                pubdate: Publication date
682
                itemtype: Item types
683
                language: Language
684
                subtype: Subtypes
685
                sorting: Sorting
686
                location: Location and availability
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-3 / +16 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-365 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">[Fewer options]</a>
374
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
362
        [% ELSE %]
375
        [% ELSIF not expanded_options %]
363
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
376
            <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
364
        [% END %]
377
        [% END %]
365
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
378
        <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
(-)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