hide lost and damaged items
authorMarijana Glavica <mglavica@ffzg.hr>
Thu, 5 Jan 2012 02:15:37 +0000 (03:15 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 17 Jan 2012 14:39:04 +0000 (15:39 +0100)
sytempreference OpacHiddenItems
damaged: [1,10]

koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
opac/opac-search.pl

index 136c7a9..6cd9932 100755 (executable)
@@ -470,8 +470,10 @@ $(document).ready(function(){
                     <span class="unavailable">
                     [% IF ( SEARCH_RESULT.onloancount ) %] Checked out ([% SEARCH_RESULT.onloancount %]), [% END %]
                     [% IF ( SEARCH_RESULT.wthdrawncount ) %] Withdrawn ([% SEARCH_RESULT.wthdrawncount %]), [% END %]
+                                       <!--
                     [% UNLESS ( SEARCH_RESULT.hidelostitems ) %][% IF ( SEARCH_RESULT.itemlostcount ) %] Lost ([% SEARCH_RESULT.itemlostcount %]),[% END %][% END %]
                     [% IF ( SEARCH_RESULT.damagedcount ) %] Damaged ([% SEARCH_RESULT.damagedcount %]),[% END %]
+                                       -->
                     [% IF ( SEARCH_RESULT.orderedcount ) %] On order ([% SEARCH_RESULT.orderedcount %]),[% END %]
                     [% IF ( SEARCH_RESULT.onholdcount ) %] On hold ([% SEARCH_RESULT.onholdcount %]),[% END %]
                     [% IF ( SEARCH_RESULT.intransitcount ) %] In transit ([% SEARCH_RESULT.intransitcount %]),[% END %]
index 12baf3b..151050b 100755 (executable)
@@ -407,11 +407,11 @@ $template->param ( QUERY_INPUTS => \@query_inputs );
 my @limit_inputs = $limit_cgi ? _input_cgi_parse($limit_cgi) : ();
 
 # add OPAC 'hidelostitems'
-#if (C4::Context->preference('hidelostitems') == 1) {
-#    # either lost ge 0 or no value in the lost register
-#    $query ="($query) and ( (lost,st-numeric <= 0) or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='') )";
-#}
-#
+if (C4::Context->preference('hidelostitems') == 1) {
+    # either lost ge 0 or no value in the lost register
+    $query ="($query) and ( (lost,st-numeric <= 0) or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='') )";
+}
+
 # add OPAC suppression - requires at least one item indexed with Suppress
 if (C4::Context->preference('OpacSuppression')) {
     $query = "($query) not Suppress=1";