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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 430-432 INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V Link Here
430
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 ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
431
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
431
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
432
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');
432
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');
433
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 7067-7072 if ( CheckVersion($DBversion) ) { Link Here
7067
    SetVersion($DBversion);
7067
    SetVersion($DBversion);
7068
}
7068
}
7069
7069
7070
$DBversion = "3.13.00.XXX";
7071
if ( CheckVersion($DBversion) ) {
7072
   $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');");
7073
   print "Upgrade to $DBversion done (Bug 9043: Add OpacAdvSearch)\n";
7074
   SetVersion ($DBversion);
7075
}
7076
7070
=head1 FUNCTIONS
7077
=head1 FUNCTIONS
7071
7078
7072
=head2 TableExists($table)
7079
=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 146-151 Link Here
146
    <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
146
    <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
147
147
148
<!-- /SEARCH BUTTONS --></div></div>
148
<!-- /SEARCH BUTTONS --></div></div>
149
[% IF OpacAdvSearch.grep('pubdate').size > 0 || expanded_options %]
149
<div class="yui-g">
150
<div class="yui-g">
150
<div id="pubrange" class="container">
151
<div id="pubrange" class="container">
151
<fieldset>
152
<fieldset>
Lines 157-163 Link Here
157
<!-- /PUB RANGE OPTION -->
158
<!-- /PUB RANGE OPTION -->
158
</div>
159
</div>
159
</div>
160
</div>
161
[% END %]
162
160
    <div class="yui-g">
163
    <div class="yui-g">
164
[% IF OpacAdvSearch.grep('itemtype').size > 0 || expanded_options %]
161
      <div id="advsearches" class="toptabs">
165
      <div id="advsearches" class="toptabs">
162
      <ul>
166
      <ul>
163
      [% FOREACH advsearchloo IN advancedsearchesloop %]
167
      [% FOREACH advsearchloo IN advancedsearchesloop %]
Lines 189-194 Link Here
189
    </div>
193
    </div>
190
    [% END %]
194
    [% END %]
191
    </div>
195
    </div>
196
[% END %]
197
198
[% IF OpacAdvSearch.grep('language').size > 0 || expanded_options %]
192
    <div id="langfilter">
199
    <div id="langfilter">
193
    <fieldset><legend>Language</legend>
200
    <fieldset><legend>Language</legend>
194
    <!-- LANGUAGE LIMIT -->
201
    <!-- LANGUAGE LIMIT -->
Lines 206-212 Link Here
206
    <!-- /LANGUAGE LIMIT -->
213
    <!-- /LANGUAGE LIMIT -->
207
    </fieldset>
214
    </fieldset>
208
    </div>
215
    </div>
209
[% IF ( expanded_options ) %]
216
[% END %]
217
218
[% IF OpacAdvSearch.grep('subtype').size > 0 || expanded_options %]
210
    [% IF ( usmarc ) %]
219
    [% IF ( usmarc ) %]
211
        <!-- SUBTYPE LIMITS -->
220
        <!-- SUBTYPE LIMITS -->
212
            <div id="subtypes" class="container"><fieldset>
221
            <div id="subtypes" class="container"><fieldset>
Lines 279-288 Link Here
279
    [% INCLUDE 'subtypes_unimarc.inc' %]</div>
288
    [% INCLUDE 'subtypes_unimarc.inc' %]</div>
280
    [% END %]
289
    [% END %]
281
[% END %]
290
[% END %]
282
        
283
</div>
291
</div>
292
284
<div class="yui-g">
293
<div class="yui-g">
285
294
295
[% IF OpacAdvSearch.grep('location').size > 0 || expanded_options %]
286
<div class="yui-u first">
296
<div class="yui-u first">
287
<!-- AVAILABILITY LIMITS -->
297
<!-- AVAILABILITY LIMITS -->
288
    [% UNLESS ( singleBranchMode ) %]
298
    [% UNLESS ( singleBranchMode ) %]
Lines 313-318 Link Here
313
    [% END %]
323
    [% END %]
314
<!-- /AVAILABILITY LIMITS -->
324
<!-- /AVAILABILITY LIMITS -->
315
</div>
325
</div>
326
[% END%]
327
328
[% IF OpacAdvSearch.grep('sorting').size > 0 || expanded_options %]
316
<div class="yui-u">
329
<div class="yui-u">
317
<!-- RANK LIMITS -->
330
<!-- RANK LIMITS -->
318
    <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
331
    <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
Lines 321-328 Link Here
321
</select></fieldset></div>
334
</select></fieldset></div>
322
<!-- RANK LIMITS -->
335
<!-- RANK LIMITS -->
323
</div>
336
</div>
337
[% END %]
324
</div>
338
</div>
325
339
340
[% IF OpacAdvSearch.size > 0 || expanded_options %]
326
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
341
<div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
327
342
328
    <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
343
    <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
Lines 336-341 Link Here
336
<!-- /SEARCH BUTTONS --></div></div>
351
<!-- /SEARCH BUTTONS --></div></div>
337
</form>
352
</form>
338
</div>
353
</div>
354
[% END %]
355
339
<script type="text/javascript" language="javascript">
356
<script type="text/javascript" language="javascript">
340
    /* This function allows to display a new field to search.
357
    /* This function allows to display a new field to search.
341
    */
358
    */
(-)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