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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc (-1 / +21 lines)
Lines 30-36 Link Here
30
                <ul>
30
                <ul>
31
                    <li>
31
                    <li>
32
                        [% IF ( available ) %]
32
                        [% IF ( available ) %]
33
                            <strong>Showing only records with available items</strong></li><li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi_not_availablity | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]">Show all records</a>
33
                            <strong>Showing only records with available items</strong></li><li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi_not_available | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]">Show all records</a>
34
                        [% ELSE %]
34
                        [% ELSE %]
35
                            <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=available">Limit to records with available items</a>
35
                            <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=available">Limit to records with available items</a>
36
                        [% END %]
36
                        [% END %]
Lines 39-44 Link Here
39
                [% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %]
39
                [% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %]
40
            </li>
40
            </li>
41
41
42
            [% IF Koha.Preference("ShowComponentRecordsFacet") == 'opac' || Koha.Preference("ShowComponentRecordsFacet") == 'both' %]
43
            <li id="component_record_facet"><h3 id="facet-compontent-records">Component records</h3>
44
                <ul>
45
                    <li>
46
                        [% IF ( limit_exclude_component_records ) || ( limit_component_records ) %]
47
                            <strong>[% IF ( limit_exclude_component_records ) %]Excluding[% ELSE %]Showing only[% END %] component records</strong>
48
                            </li>
49
                            <li>
50
                                <a href="/cgi-bin/koha/opac-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>
51
                        [% ELSE %]
52
                            <a href="/cgi-bin/koha/opac-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>
53
                            </li>
54
                            <li>
55
                            <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=component_records">Limit to component records</a>
56
                        [% END # /IF limit_exclude_component_records %]
57
                    </li>
58
                </ul>
59
            </li> <!-- /#component_record_facet -->
60
            [% END # /IF ShowComponentRecordsFacet %]
61
42
            [% FOREACH facets_loo IN facets_loop %]
62
            [% FOREACH facets_loo IN facets_loop %]
43
                [% IF facets_loo.facets.size > 0 %]
63
                [% IF facets_loo.facets.size > 0 %]
44
                    <li id="[% facets_loo.type_id | html %]">
64
                    <li id="[% facets_loo.type_id | html %]">
(-)a/opac/opac-search.pl (-6 / +16 lines)
Lines 440-452 if (@searchCategories > 0) { Link Here
440
@limits = map { uri_unescape($_) } @limits;
440
@limits = map { uri_unescape($_) } @limits;
441
441
442
442
443
my $available;
443
my ( $available, $component_records, $exclude_component_records );
444
foreach my $limit(@limits) {
444
foreach my $limit(@limits) {
445
    if ($limit =~/available/) {
445
    if ($limit =~/available/) {
446
        $available = 1;
446
        $available = 1;
447
    }
447
    }
448
    elsif ( $limit =~ /^component_records$/ ) {
449
        $component_records = 1;
450
    } elsif ( $limit =~ /^exclude_component_records$/ ) {
451
        $exclude_component_records = 1;
452
    }
448
}
453
}
449
$template->param(available => $available);
454
$template->param(
455
    available                       => $available,
456
    limit_component_records         => $component_records,
457
    limit_exclude_component_records => $exclude_component_records,
458
);
450
459
451
# append year limits if they exist
460
# append year limits if they exist
452
if ($params->{'limit-yr'}) {
461
if ($params->{'limit-yr'}) {
Lines 775-783 for (my $i=0;$i<@servers;$i++) { Link Here
775
                $session->param('busc' => $pasarParams);
784
                $session->param('busc' => $pasarParams);
776
            }
785
            }
777
            $template->param(total => $hits);
786
            $template->param(total => $hits);
778
            my $limit_cgi_not_availablity = $limit_cgi;
787
            foreach my $limit_case ( 'available', 'component_records', 'exclude_component_records' ) {
779
            $limit_cgi_not_availablity =~ s/&limit=available//g if defined $limit_cgi_not_availablity;
788
                my $limit_cgi_not_case = $limit_cgi;
780
            $template->param(limit_cgi_not_availablity => $limit_cgi_not_availablity);
789
                $limit_cgi_not_case = s/&limit=$limit_case//g if defined $limit_cgi_not_case;
790
                $template->param( "limit_cgi_not_$limit_case" => $limit_cgi_not_case );
791
            }
781
            $template->param(limit_cgi => $limit_cgi);
792
            $template->param(limit_cgi => $limit_cgi);
782
            $template->param(countrss  => $countRSS );
793
            $template->param(countrss  => $countRSS );
783
            $template->param(query_cgi => $query_cgi);
794
            $template->param(query_cgi => $query_cgi);
784
- 

Return to bug 15728