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

(-)a/catalogue/search.pl (-2 / +11 lines)
Lines 400-412 if ($operands[0] && !$operands[1]) { Link Here
400
    $basic_search=1;
400
    $basic_search=1;
401
}
401
}
402
402
403
my $available;
403
my ( $available, $component_records, $exclude_component_records );
404
foreach my $limit(@limits) {
404
foreach my $limit(@limits) {
405
    if ($limit =~/available/) {
405
    if ($limit =~/available/) {
406
        $available = 1;
406
        $available = 1;
407
    }
407
    }
408
    elsif ( $limit =~ /^component_records$/ ) {
409
        $component_records = 1;
410
    } elsif ( $limit =~ /^exclude_component_records$/ ) {
411
        $exclude_component_records = 1;
412
    }
408
}
413
}
409
$template->param(available => $available);
414
$template->param(
415
    available                       => $available,
416
    limit_component_records         => $component_records,
417
    limit_exclude_component_records => $exclude_component_records,
418
);
410
419
411
# append year limits if they exist
420
# append year limits if they exist
412
my $limit_yr;
421
my $limit_yr;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc (-1 / +21 lines)
Lines 47-52 Link Here
47
                    [% END %]
47
                    [% END %]
48
                </li> <!-- /#availability_facet -->
48
                </li> <!-- /#availability_facet -->
49
49
50
                [% IF Koha.Preference("ShowComponentRecordsFacet") == 'staff' || Koha.Preference("ShowComponentRecordsFacet") == 'both' %]
51
                <li id="component_record_facet">
52
                    Component records
53
                    <ul>
54
                        <li>
55
                            [% IF ( limit_exclude_component_records ) || ( limit_component_records ) %]
56
                                <strong>[% IF ( limit_exclude_component_records ) %]Excluding[% ELSE %]Showing only[% END %] component records</strong>
57
                                </li>
58
                                <li>
59
                                    <a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %][% IF ( limit_exclude_component_records ) %][% limit_cgi_not_limit_exclude_component_records %][% END %][% IF ( limit_component_records ) %][% limit_cgi_not_limit_component_records %][% END %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">Show all records</a>
60
                            [% ELSE %]
61
                                <a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]&amp;limit=exclude_component_records">Exclude component records</a>
62
                                </li>
63
                                <li>
64
                                <a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]&amp;limit=component_records">Show component records</a>
65
                            [% END # /IF limit_exclude_component_records %]
66
                        </li>
67
                    </ul>
68
                </li> <!-- /#component_record_facet -->
69
                [% END # /IF ShowComponentRecordsFacet %]
70
50
                [% FOREACH facets_loo IN facets_loop %]
71
                [% FOREACH facets_loo IN facets_loop %]
51
                    [% IF facets_loo.facets.size > 0 %]
72
                    [% IF facets_loo.facets.size > 0 %]
52
                        <li id="[% facets_loo.type_id | html %]">
73
                        <li id="[% facets_loo.type_id | html %]">
53
- 

Return to bug 15728