Bug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is...
[koha_fer] / catalogue / moredetail.pl
index 66d731b..28deb3b 100755 (executable)
@@ -167,14 +167,14 @@ foreach my $item (@items){
     }
     $item->{'datereceived'}            = $order->{'datereceived'};
 
-    if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) {
+    if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{withdrawn}) {
         $item->{status_advisory} = 1;
     }
 
-    if (C4::Context->preference("IndependantBranches")) {
+    if (C4::Context->preference("IndependentBranches")) {
         #verifying rights
         my $userenv = C4::Context->userenv();
-        unless (($userenv->{'flags'} == 1) or ($userenv->{'branch'} eq $item->{'homebranch'})) {
+        unless (C4::Context->IsSuperLibrarian() or ($userenv->{'branch'} eq $item->{'homebranch'})) {
                 $item->{'nomod'}=1;
         }
     }
@@ -213,6 +213,9 @@ $template->param(
     hidepatronname      => $hidepatronname,
 );
 $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
+$template->{'VARS'}->{'searchid'} = $query->param('searchid');
+
+
 
 output_html_with_http_headers $query, $cookie, $template->output;