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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 427-429 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
430
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearch','pubdate|itemtype|language|subtype|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 7010-7015 CREATE TABLE IF NOT EXISTS borrower_files ( Link Here
7010
    SetVersion($DBversion);
7010
    SetVersion($DBversion);
7011
}
7011
}
7012
7012
7013
$DBversion = "3.11.00.XXX";
7014
if ( CheckVersion($DBversion) ) {
7015
   $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAdvSearch','pubdate|itemtype|language|subtype|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple');");
7016
   print "Upgrade to $DBversion done (Bug 9043: Add OpacAdvSearch)\n";
7017
   SetVersion ($DBversion);
7018
}
7019
7013
=head1 FUNCTIONS
7020
=head1 FUNCTIONS
7014
7021
7015
=head2 TableExists($table)
7022
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+11 lines)
Lines 619-621 OPAC: Link Here
619
            - pref: PatronSelfRegistrationAdditionalInstructions
619
            - pref: PatronSelfRegistrationAdditionalInstructions
620
              type: textarea
620
              type: textarea
621
              class: html
621
              class: html
622
    Advanced Search Options:
623
        -
624
            - Show search options
625
            - pref: OpacAdvSearch
626
              multiple:
627
                pubdate: Publication date
628
                itemtype: Item types
629
                language: Language
630
                subtype: Subtypes
631
                sorting: Sorting
632
                location: Location
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt (-2 / +19 lines)
Lines 145-150 Link Here
145
    <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
145
    <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
146
146
147
<!-- /SEARCH BUTTONS --></div></div>
147
<!-- /SEARCH BUTTONS --></div></div>
148
[% IF OpacAdvSearch.grep('pubdate').size > 0 || expanded_options %]
148
<div class="yui-g">
149
<div class="yui-g">
149
<div id="pubrange" class="container">
150
<div id="pubrange" class="container">
150
<fieldset>
151
<fieldset>
Lines 156-162 Link Here
156
<!-- /PUB RANGE OPTION -->
157
<!-- /PUB RANGE OPTION -->
157
</div>
158
</div>
158
</div>
159
</div>
160
[% END %]
161
159
    <div class="yui-g">
162
    <div class="yui-g">
163
[% IF OpacAdvSearch.grep('itemtype').size > 0 || expanded_options %]
160
      <div id="advsearches" class="toptabs">
164
      <div id="advsearches" class="toptabs">
161
      <ul>
165
      <ul>
162
      [% FOREACH advsearchloo IN advancedsearchesloop %]
166
      [% FOREACH advsearchloo IN advancedsearchesloop %]
Lines 188-193 Link Here
188
    </div>
192
    </div>
189
    [% END %]
193
    [% END %]
190
    </div>
194
    </div>
195
[% END %]
196
197
[% IF OpacAdvSearch.grep('language').size > 0 || expanded_options %]
191
    <div id="langfilter">
198
    <div id="langfilter">
192
    <fieldset><legend>Language</legend>
199
    <fieldset><legend>Language</legend>
193
    <!-- LANGUAGE LIMIT -->
200
    <!-- LANGUAGE LIMIT -->
Lines 205-211 Link Here
205
    <!-- /LANGUAGE LIMIT -->
212
    <!-- /LANGUAGE LIMIT -->
206
    </fieldset>
213
    </fieldset>
207
    </div>
214
    </div>
208
[% IF ( expanded_options ) %]
215
[% END %]
216
217
[% IF OpacAdvSearch.grep('subtype').size > 0 || expanded_options %]
209
    [% IF ( usmarc ) %]
218
    [% IF ( usmarc ) %]
210
        <!-- SUBTYPE LIMITS -->
219
        <!-- SUBTYPE LIMITS -->
211
            <div id="subtypes" class="container"><fieldset>
220
            <div id="subtypes" class="container"><fieldset>
Lines 278-287 Link Here
278
    [% INCLUDE 'subtypes_unimarc.inc' %]</div>
287
    [% INCLUDE 'subtypes_unimarc.inc' %]</div>
279
    [% END %]
288
    [% END %]
280
[% END %]
289
[% END %]
281
        
282
</div>
290
</div>
291
283
<div class="yui-g">
292
<div class="yui-g">
284
293
294
[% IF OpacAdvSearch.grep('location').size > 0 || expanded_options %]
285
<div class="yui-u first">
295
<div class="yui-u first">
286
<!-- AVAILABILITY LIMITS -->
296
<!-- AVAILABILITY LIMITS -->
287
    [% UNLESS ( singleBranchMode ) %]
297
    [% UNLESS ( singleBranchMode ) %]
Lines 312-317 Link Here
312
    [% END %]
322
    [% END %]
313
<!-- /AVAILABILITY LIMITS -->
323
<!-- /AVAILABILITY LIMITS -->
314
</div>
324
</div>
325
[% END%]
326
327
[% IF OpacAdvSearch.grep('sorting').size > 0 || expanded_options %]
315
<div class="yui-u">
328
<div class="yui-u">
316
<!-- RANK LIMITS -->
329
<!-- RANK LIMITS -->
317
    <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
330
    <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
Lines 320-327 Link Here
320
</select></fieldset></div>
333
</select></fieldset></div>
321
<!-- RANK LIMITS -->
334
<!-- RANK LIMITS -->
322
</div>
335
</div>
336
[% END %]
323
</div>
337
</div>
324
338
339
[% IF OpacAdvSearch.size > 0 || expanded_options %]
325
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
340
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
326
341
327
    <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
342
    <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
Lines 335-340 Link Here
335
<!-- /SEARCH BUTTONS --></div></div>
350
<!-- /SEARCH BUTTONS --></div></div>
336
</form>
351
</form>
337
</div>
352
</div>
353
[% END %]
354
338
<script type="text/javascript" language="javascript">
355
<script type="text/javascript" language="javascript">
339
    /* This function allows to display a new field to search.
356
    /* This function allows to display a new field to search.
340
    */
357
    */
(-)a/opac/opac-search.pl (-2 / +4 lines)
Lines 146-153 elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { Link Here
146
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
146
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
147
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
147
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
148
148
149
my @advsearch_limits = split /\|/, C4::Context->preference('OpacAdvSearch');
149
$template->param(
150
$template->param(
150
    OpacStarRatings => C4::Context->preference("OpacStarRatings") );
151
    OpacStarRatings => C4::Context->preference("OpacStarRatings"),
152
    OpacAdvSearch => \@advsearch_limits,
153
);
151
154
152
if (C4::Context->preference('BakerTaylorEnabled')) {
155
if (C4::Context->preference('BakerTaylorEnabled')) {
153
    $template->param(
156
    $template->param(
154
- 

Return to bug 9043