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

(-)a/catalogue/search.pl (+5 lines)
Lines 403-408 my @nolimits = map uri_unescape($_), $cgi->multi_param('nolimit'); Link Here
403
my %is_nolimit = map { $_ => 1 } @nolimits;
403
my %is_nolimit = map { $_ => 1 } @nolimits;
404
@limits = grep { not $is_nolimit{$_} } @limits;
404
@limits = grep { not $is_nolimit{$_} } @limits;
405
405
406
my @branch = map uri_unescape($_), $cgi->multi_param('branch');
407
if( @branch ) {
408
    push @limits, '(' . join (" or ", map {'branch: ' . $_ } @branch ) . ')';
409
}
410
406
if($params->{'multibranchlimit'}) {
411
if($params->{'multibranchlimit'}) {
407
    my $library_category = Koha::LibraryCategories->find( $params->{multibranchlimit} );
412
    my $library_category = Koha::LibraryCategories->find( $params->{multibranchlimit} );
408
    my @libraries = $library_category->libraries;
413
    my @libraries = $library_category->libraries;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (-11 / +13 lines)
Lines 250-265 Link Here
250
</fieldset>
250
</fieldset>
251
251
252
<fieldset id="select-libs">
252
<fieldset id="select-libs">
253
        <p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop" onchange='if(this.value != ""){document.getElementById("categoryloop").disabled=true;} else {document.getElementById("categoryloop").disabled=false;}'>
253
        <p>
254
        <option value="">All libraries</option>
254
            <label for="branchloop">Individual libraries:</label>
255
        [% FOREACH branchloo IN branchloop %]
255
            [% FOREACH branchloo IN branchloop %]
256
        [% IF ( branchloo.selected ) %]
256
                <p>
257
        <option value="branch:[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
257
                [% IF ( branchloo.selected ) %]
258
        [% ELSE %]
258
                    <input id="branch_[% branchloo.value %]" type="checkbox" checked="checked" name="branch" value="[% branchloo.value %]" />
259
        <option value="branch:[% branchloo.value %]">[% branchloo.branchname %]</option>
259
                [% ELSE %]
260
        [% END %]
260
                    <input id="branch_[% branchloo.value %]" type="checkbox" name="branch" value="[% branchloo.value %]" />
261
        [% END %]
261
                [% END %]
262
        </select></p>
262
                <label for="branch_[% branchloo.value %]">[% branchloo.branchname %]</label>
263
                </p>
264
            [% END %]
265
        </p>
263
    <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
266
    <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
264
        [% IF ( searchdomainloop ) %]
267
        [% IF ( searchdomainloop ) %]
265
    <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
268
    <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
266
- 

Return to bug 16659