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 <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2008-05-07 19:15:53 +02:00 committed by Joshua Ferraro
parent feae120738
commit bc11a3bce2
2 changed files with 9 additions and 1 deletions

View file

@ -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 ''){

View file

@ -41,7 +41,7 @@
<!-- TMPL_LOOP NAME="ITEM_DATA" -->
<div class="yui-g">
<h3 id="item<!-- TMPL_VAR NAME="itemnumber" -->">Barcode <!-- TMPL_VAR NAME="barcode" --> <!-- TMPL_IF name="notforloantext" --><!-- TMPL_VAR name="notforloantext" --> <!-- /TMPL_IF --></h3>
<div class="listgroup"><h4>Item Information <!-- TMPL_IF NAME="CAN_user_editcatalogue" --><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">[Edit Items]</a><!-- /TMPL_IF --></h4>
<div class="listgroup"><h4>Item Information <!-- TMPL_IF NAME="CAN_user_editcatalogue" --><!-- TMPL_UNLESS name="nomod" --><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">[Edit Items]</a><!-- /TMPL_IF --><!-- /TMPL_UNLESS --></h4>
<ol class="bibliodetails">
<li><span class="label">Home Library:</span> <!-- TMPL_VAR NAME="homebranchname" -->&nbsp;</li>
<!-- TMPL_IF NAME="item-level_itypes" -->