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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 413-415 INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V Link Here
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
414
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number OPAC searches', 'YesNo');
414
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number OPAC searches', 'YesNo');
415
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo');
415
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo');
416
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 6407-6412 if ( CheckVersion($DBversion) ) { Link Here
6407
   SetVersion ($DBversion);
6407
   SetVersion ($DBversion);
6408
}
6408
}
6409
6409
6410
$DBversion = "3.11.00.XXX";
6411
if ( CheckVersion($DBversion) ) {
6412
   $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');");
6413
   print "Upgrade to $DBversion done (Bug 9043: Add OpacAdvSearch)\n";
6414
   SetVersion ($DBversion);
6415
}
6416
6410
=head1 FUNCTIONS
6417
=head1 FUNCTIONS
6411
6418
6412
=head2 TableExists($table)
6419
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+11 lines)
Lines 573-575 OPAC: Link Here
573
            - pref: PatronSelfRegistrationBorrowerUnwantedField
573
            - pref: PatronSelfRegistrationBorrowerUnwantedField
574
              class: multi
574
              class: multi
575
            - (separate columns with |)
575
            - (separate columns with |)
576
    Advanced Search Options:
577
        -
578
            - Show search options
579
            - pref: OpacAdvSearch
580
              multiple:
581
                pubdate: Publication date
582
                itemtype: Item types
583
                language: Language
584
                subtype: Subtypes
585
                sorting: Sorting
586
                location: Location
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt (-2 / +19 lines)
Lines 142-147 Link Here
142
    <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
142
    <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
143
143
144
<!-- /SEARCH BUTTONS --></div></div>
144
<!-- /SEARCH BUTTONS --></div></div>
145
[% IF OpacAdvSearch.grep('pubdate').size > 0 %]
145
<div class="yui-g">
146
<div class="yui-g">
146
<div id="pubrange" class="container">
147
<div id="pubrange" class="container">
147
<fieldset>
148
<fieldset>
Lines 153-159 Link Here
153
<!-- /PUB RANGE OPTION -->
154
<!-- /PUB RANGE OPTION -->
154
</div>
155
</div>
155
</div>
156
</div>
157
[% END %]
158
156
    <div class="yui-g">
159
    <div class="yui-g">
160
[% IF OpacAdvSearch.grep('itemtype').size > 0 %]
157
      <div id="advsearches" class="toptabs">
161
      <div id="advsearches" class="toptabs">
158
      <ul>
162
      <ul>
159
      [% FOREACH advsearchloo IN advancedsearchesloop %]
163
      [% FOREACH advsearchloo IN advancedsearchesloop %]
Lines 185-190 Link Here
185
    </div>
189
    </div>
186
    [% END %]
190
    [% END %]
187
    </div>
191
    </div>
192
[% END %]
193
194
[% IF OpacAdvSearch.grep('language').size > 0 %]
188
    <div id="langfilter">
195
    <div id="langfilter">
189
    <fieldset><legend>Language</legend>
196
    <fieldset><legend>Language</legend>
190
    <!-- LANGUAGE LIMIT -->
197
    <!-- LANGUAGE LIMIT -->
Lines 202-208 Link Here
202
    <!-- /LANGUAGE LIMIT -->
209
    <!-- /LANGUAGE LIMIT -->
203
    </fieldset>
210
    </fieldset>
204
    </div>
211
    </div>
205
[% IF ( expanded_options ) %]
212
[% END %]
213
214
[% IF OpacAdvSearch.grep('subtype').size > 0 && expanded_options %]
206
    [% IF ( usmarc ) %]
215
    [% IF ( usmarc ) %]
207
        <!-- SUBTYPE LIMITS -->
216
        <!-- SUBTYPE LIMITS -->
208
            <div id="subtypes" class="container"><fieldset>
217
            <div id="subtypes" class="container"><fieldset>
Lines 275-284 Link Here
275
    [% INCLUDE 'subtypes_unimarc.inc' %]</div>
284
    [% INCLUDE 'subtypes_unimarc.inc' %]</div>
276
    [% END %]
285
    [% END %]
277
[% END %]
286
[% END %]
278
        
279
</div>
287
</div>
288
280
<div class="yui-g">
289
<div class="yui-g">
281
290
291
[% IF OpacAdvSearch.grep('location').size > 0 %]
282
<div class="yui-u first">
292
<div class="yui-u first">
283
<!-- AVAILABILITY LIMITS -->
293
<!-- AVAILABILITY LIMITS -->
284
    [% UNLESS ( singleBranchMode ) %]
294
    [% UNLESS ( singleBranchMode ) %]
Lines 309-314 Link Here
309
    [% END %]
319
    [% END %]
310
<!-- /AVAILABILITY LIMITS -->
320
<!-- /AVAILABILITY LIMITS -->
311
</div>
321
</div>
322
[% END%]
323
324
[% IF OpacAdvSearch.grep('sorting').size > 0 %]
312
<div class="yui-u">
325
<div class="yui-u">
313
<!-- RANK LIMITS -->
326
<!-- RANK LIMITS -->
314
    <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
327
    <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
Lines 317-324 Link Here
317
</select></fieldset></div>
330
</select></fieldset></div>
318
<!-- RANK LIMITS -->
331
<!-- RANK LIMITS -->
319
</div>
332
</div>
333
[% END %]
320
</div>
334
</div>
321
335
336
[% IF OpacAdvSearch.size > 0 %]
322
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
337
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
323
338
324
    <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
339
    <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
Lines 332-337 Link Here
332
<!-- /SEARCH BUTTONS --></div></div>
347
<!-- /SEARCH BUTTONS --></div></div>
333
</form>
348
</form>
334
</div>
349
</div>
350
[% END %]
351
335
<script type="text/javascript" language="javascript">
352
<script type="text/javascript" language="javascript">
336
    /* This function allows to display a new field to search.
353
    /* This function allows to display a new field to search.
337
    */
354
    */
(-)a/opac/opac-search.pl (-2 / +4 lines)
Lines 127-134 elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { Link Here
127
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
127
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
128
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
128
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
129
129
130
my @advsearch_limits = split /\|/, C4::Context->preference('OpacAdvSearch');
130
$template->param(
131
$template->param(
131
    OpacStarRatings => C4::Context->preference("OpacStarRatings") );
132
    OpacStarRatings => C4::Context->preference("OpacStarRatings"),
133
    OpacAdvSearch => \@advsearch_limits,
134
);
132
135
133
if (C4::Context->preference('BakerTaylorEnabled')) {
136
if (C4::Context->preference('BakerTaylorEnabled')) {
134
    $template->param(
137
    $template->param(
135
- 

Return to bug 9043