From 8836d1eda5c349c2a43a38e9f0e7dc003ffcbdfa Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Wed, 7 Mar 2012 16:53:09 +1300 Subject: [PATCH] Bug 6488: Display OPAC search result count conditional to OpacHiddenItems syspref Signed-off-by: Marcel de Rooy Works as advertised. Amended this patch for a small spelling issue: supress->suppress. Could not suppress it ;) Signed-off-by: Jared Camins-Esakov --- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 1 + opac/opac-search.pl | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index f3d1535113..a0944ae8d3 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -380,6 +380,7 @@ $(document).ready(function(){ [% IF ( opacbookbag ) %] [% ELSE %] [% IF ( virtualshelves ) %] [% ELSE %] [% IF ( RequestOnOpac ) %][% UNLESS ( SEARCH_RESULT.norequests ) %][% IF ( opacuserlogin ) %] [% END %][% END %][% END %][% END %][% END %] + [% UNLESS suppress_result_number %][% SEARCH_RESULT.result_number %].[% END %] [% UNLESS ( item_level_itypes ) %] [% UNLESS ( noItemTypeImages ) %] diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 5a9ee45a92..21430d38b5 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -613,8 +613,12 @@ for (my $i=0;$i<@servers;$i++) { } $template->param(stopwords_removed => "@$stopwords_removed") if $stopwords_removed; $template->param(results_per_page => $results_per_page); - $template->param(SEARCH_RESULTS => \@newresults, - OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay") eq "itemdetails"?1:0), + my $hide = C4::Context->preference('OpacHiddenItems'); + $hide = ($hide =~ m/\S/) if $hide; # Just in case it has some spaces/new lines + $template->param( + SEARCH_RESULTS => \@newresults, + OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay") eq "itemdetails"?1:0), + suppress_result_number => $hide, ); ## Build the page numbers on the bottom of the page my @page_numbers; -- 2.39.5