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"),
<span class="unavailable">
<!-- TMPL_IF NAME="onloancount" --> On loan (<!-- TMPL_VAR NAME="onloancount" -->), <!-- /TMPL_IF -->
<!-- TMPL_IF NAME="wthdrawncount" --> Withdrawn (<!-- TMPL_VAR NAME="wthdrawncount" -->), <!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="itemlostcount" --> Lost (<!-- TMPL_VAR NAME="itemlostcount" -->),<!-- /TMPL_IF -->
+ <!-- TMPL_UNLESS NAME="hidelostitems" --><!-- TMPL_IF NAME="itemlostcount" --> Lost (<!-- TMPL_VAR NAME="itemlostcount" -->),<!-- /TMPL_IF --><!-- /TMPL_UNLESS -->
<!-- TMPL_IF NAME="damagedcount" --> Damaged (<!-- TMPL_VAR NAME="damagedcount" -->),<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="orderedcount" --> On order (<!-- TMPL_VAR NAME="orderedcount" -->),<!-- /TMPL_IF -->
</span>
$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) {