Bugzilla – Attachment 25959 Details for
Bug 11909
Fix hidelostitems, OpacHiddenItems total count, prog them facet display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11909 - Fix hidelostitems, OpacHiddenItems total count, prog theme facet display
0001-Bug-11909-Fix-hidelostitems-OpacHiddenItems-total-co.patch (text/plain), 2.58 KB, created by
wajasu
on 2014-03-07 19:34:27 UTC
(
hide
)
Description:
Bug 11909 - Fix hidelostitems, OpacHiddenItems total count, prog theme facet display
Filename:
MIME Type:
Creator:
wajasu
Created:
2014-03-07 19:34:27 UTC
Size:
2.58 KB
patch
obsolete
>From fd2a89b4edfec238e82a8a283b8b4eb6d89741ad Mon Sep 17 00:00:00 2001 >From: wajasu <matted-34813@mypacks.net> >Date: Fri, 7 Mar 2014 12:05:12 -0600 >Subject: [PATCH] Bug 11909 - Fix hidelostitems, OpacHiddenItems total count, > prog theme facet display > >hidelostitems hides the biblio when all items are lost. > fix makes it so we hide the items, not the biblio. > >opac-search.pl search results calculates correct "total" > so that Number of results found indicator is correct, > and auto-redirect to details when ONLY one result is returned > works. > >facets "Refine your search" displays in "prog" theme when > no search results returned. >--- > C4/Search.pm | 6 ------ > koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 2 +- > opac/opac-search.pl | 2 +- > 3 files changed, 2 insertions(+), 8 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 09c1951..284abff 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1867,17 +1867,11 @@ sub searchResults { > > # OPAC hidden items > if ($is_opac) { >- # hidden because lost >- if ($hidelostitems && $item->{itemlost}) { >- $hideatopac_count++; >- next; >- } > # hidden based on OpacHiddenItems syspref > my @hi = C4::Items::GetHiddenItemnumbers($item); > if (scalar @hi) { > push @hiddenitems, @hi; > $hideatopac_count++; >- next; > } > } > >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 9235b2b..d93b831 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -757,7 +757,7 @@ $(document).ready(function(){ > </div> > </div> > </div> >- [% IF ( opacfacets ) %] >+ [% IF ( opacfacets && SEARCH_RESULTS.size ) %] > <div class="yui-b"><div id="facetcontainer" class="container"> > <!-- FACETS START --> > [% INCLUDE 'opac-facets.inc' %] >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 617d67e..a6fbea8 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -610,7 +610,7 @@ for (my $i=0;$i<@servers;$i++) { > } > > if ($results_hashref->{$server}->{"hits"}){ >- $total = $total + $results_hashref->{$server}->{"hits"}; >+ $total = @newresults; # newresults will just have the hidden biblios filtered (see Search) > } > > # Opac search history >-- >1.8.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11909
:
25959
|
26393