From bc11a3bce220f576379b8795a8e56f7988889acc Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Wed, 7 May 2008 19:15:53 +0200 Subject: [PATCH] BUGFIX (bloquing) moredetail & item edition this patch introduce the same behaviour as for additem.pl, ie : edit only own homebranch items, except for superlibrarians Signed-off-by: Joshua Ferraro --- catalogue/moredetail.pl | 8 ++++++++ .../prog/en/modules/catalogue/moredetail.tmpl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 8d30c7646b..4736ded588 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -94,6 +94,14 @@ foreach my $item (@items){ $item->{'datelastseen'} = format_date($item->{'datelastseen'}); $item->{'ordernumber'} = $ordernum; $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'}; + + if (C4::Context->preference("IndependantBranches")) { + #verifying rights + my $userenv = C4::Context->userenv(); + unless (($userenv->{'flags'} == 1) or ($userenv->{'branch'} eq $item->{'homebranch'})) { + $item->{'nomod'}=1; + } + } $item->{'homebranchname'} = GetBranchName($item->{'homebranch'}); $item->{'holdingbranchname'} = GetBranchName($item->{'holdingbranch'}); if ($item->{'onloan'} eq ''){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index 562cdb7dee..3149559934 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -41,7 +41,7 @@

">Barcode

-

Item Information &itemnumber=">[Edit Items]

+

Item Information &itemnumber=">[Edit Items]

  1. Home Library:  
  2. -- 2.20.1