From db101d35d07abff908a87440323075fd99c7605c Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 17 Mar 2008 23:33:44 -0400 Subject: [PATCH] fix for bug 1781 for NOZebra=OFF Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 1 + koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl | 2 +- opac/opac-detail.pl | 11 ++++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index ac24b79ac3..7ed68b41e2 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -319,6 +319,7 @@ sub get_template_and_user { reviewson => C4::Context->preference("reviewson"), hide_marc => C4::Context->preference("hide_marc"), patronimages => C4::Context->preference("patronimages"), + hidelostitems => C4::Context->preference("hidelostitems"), mylibraryfirst => C4::Context->preference("SearchMyLibraryFirst"), "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"), diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index d45d0b03e6..f0cddd29cd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -212,7 +212,7 @@ $(document).ready(function(){ On loan (), Withdrawn (), - Lost (), + Lost (), Damaged (), On order (), diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index b442e3adca..6c4f7a5f4f 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -50,7 +50,16 @@ my $biblionumber = $query->param('biblionumber') || $query->param('bib'); $template->param( biblionumber => $biblionumber ); # change back when ive fixed request.pl -my @items = &GetItemsInfo( $biblionumber, 'opac' ); +my @all_items = &GetItemsInfo( $biblionumber, 'opac' ); +my @items; +@items = @all_items unless C4::Context->preference('hidelostitems'); + +if (C4::Context->preference('hidelostitems')) { + # Hide host items + for my $itm (@all_items) { + push @items, $itm unless $itm->{itemlost}; + } +} my $dat = &GetBiblioData($biblionumber); if (!$dat) { -- 2.39.5