koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.20,1.20.4.1


From: Owen Leonard
Subject: [Koha-cvs] CVS: koha/circ branchtransfers.pl,1.20,1.20.4.1
Date: Wed, 10 Aug 2005 14:36:11 -0700

Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29347/circ

Modified Files:
      Tag: rel_2_2
        branchtransfers.pl 
Log Message:
- updating alternating table row switch to work with CSS
- adding 'allmessages' variable to tell template whether to display error 
message container
- adding more borrower information details so that reserve notification matches 
that on returns screen

Index: branchtransfers.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/branchtransfers.pl,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -C2 -r1.20 -r1.20.4.1
*** branchtransfers.pl  11 Mar 2003 15:13:18 -0000      1.20
--- branchtransfers.pl  10 Aug 2005 21:36:08 -0000      1.20.4.1
***************
*** 37,42 ****
  
  my %env;
! my $linecolor1='#ffffcc';
! my $linecolor2='white';
  
  my $branches = getbranches();
--- 37,42 ----
  
  my %env;
! my $linecolor1= 0;
! my $linecolor2= 1;
  
  my $branches = getbranches();
***************
*** 64,67 ****
--- 64,68 ----
  my $setwaiting;
  my $reqbrchname;
+ my $allmessages;
  
  my $request=$query->param('request');
***************
*** 78,81 ****
--- 79,83 ----
        $cancelled = 1;
        $reqmessage =1;
+       $allmessages = 1;
  }
  
***************
*** 88,91 ****
--- 90,94 ----
        $setwaiting = 1;
        $reqmessage =1;
+       $allmessages = 1;
  }
  if ($request eq 'KillReserved'){
***************
*** 94,97 ****
--- 97,101 ----
        $cancelled = 1;
        $reqmessage =1;
+       $allmessages = 1;
  }
  
***************
*** 181,186 ****
  }
  
! 
! my $name;
  my $bornum;
  my $borcnum;
--- 185,197 ----
  }
  
! my $title;
! my $surname;
! my $firstname;
! my $bornum;
! my $borphone;
! my $borstraddress;
! my $borcity;
! my $borzip;
! my $boremail;
  my $bornum;
  my $borcnum;
***************
*** 188,191 ****
--- 199,203 ----
  my $biblionum;
  my $branchname;
+ my $wastransferred;
  
  
***************
*** 196,201 ****
        $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
        my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
!       $name = name($borr);
!       $bornum = $borr->{'borrowernumber'}; #Hopefully, 
borr->{borrowernumber}=res->{borrowernumber}
        $borcnum = $borr->{'cardnumber'};
        $itemnumber = $res->{'itemnumber'};
--- 208,222 ----
        $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
        my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
!       $title = $borr->{'title'};
!       $surname = $borr->{'surname'};
!       $firstname = $borr->{'firstname'};
!       $bornum = $borr->{'borrowernumber'};
!     $borphone = $borr->{'phone'};
!     $borstraddress = $borr->{'streetaddress'};
!       $borcity = $borr->{'city'};
!       $borzip = $borr->{'zipcode'};
!       $boremail = $borr->{'emailadress'};
!       
!       #Hopefully, borr->{borrowernumber}=res->{borrowernumber}
        $borcnum = $borr->{'cardnumber'};
        $itemnumber = $res->{'itemnumber'};
***************
*** 215,245 ****
  foreach my $code (keys %$messages) {
        my %err;
!     $err{errbadcode} = ($code eq 'BadBarcode');
        if ($code eq 'BadBarcode') {
                $err{msg}=$messages->{'BadBarcode'};
        }
  
-     $err{errispermanent} = ($code eq 'IsPermanent');
      if ($code eq 'IsPermanent'){
                $err{msg} = 
$branches->{$messages->{'IsPermanent'}}->{'branchname'};
                # Here, msg contains the branchname
                # Not so satisfied with this... But should work
      }
      $err{errdesteqholding} = ($code eq 'DestinationEqualsHolding');
  
-       $err{errwasreturned} = ($code eq 'WasReturned');
        if ($code eq 'WasReturned') {
                my ($borrowerinfo) = getpatroninformation(\%env, 
$messages->{'WasReturned'}, 0);
!               $name =name($borrowerinfo);
                $bornum =$borrowerinfo->{'borrowernumber'};
                $borcnum =$borrowerinfo->{'cardnumber'};
      }
!     if ($code eq 'WasTransfered'){
  # Put code here if you want to notify the user that item was transfered...
!     }
        push (@errmsgloop, \%err);
  }
  
- 
  
#######################################################################################
  # Make the page .....
--- 236,272 ----
  foreach my $code (keys %$messages) {
        my %err;
! 
        if ($code eq 'BadBarcode') {
                $err{msg}=$messages->{'BadBarcode'};
+               $err{errbadcode} = 1;
+               $allmessages = 1;
        }
  
      if ($code eq 'IsPermanent'){
+               $err{errispermanent} = 1;
                $err{msg} = 
$branches->{$messages->{'IsPermanent'}}->{'branchname'};
                # Here, msg contains the branchname
                # Not so satisfied with this... But should work
+               $allmessages = 1;
      }
      $err{errdesteqholding} = ($code eq 'DestinationEqualsHolding');
  
        if ($code eq 'WasReturned') {
+               $err{errwasreturned} = 1;
+               $allmessages = 1;
                my ($borrowerinfo) = getpatroninformation(\%env, 
$messages->{'WasReturned'}, 0);
!               $title = $borrowerinfo->{'title'};
!               $surname = $borrowerinfo->{'surname'};
!               $firstname = $borrowerinfo->{'firstname'};
                $bornum =$borrowerinfo->{'borrowernumber'};
                $borcnum =$borrowerinfo->{'cardnumber'};
      }
! #    if ($code eq 'WasTransfered'){
  # Put code here if you want to notify the user that item was transfered...
! #             $wastransferred = 1;
! #    }
        push (@errmsgloop, \%err);
  }
  
  
#######################################################################################
  # Make the page .....
***************
*** 251,254 ****
--- 278,285 ----
                              flagsrequired => {circulate => 1},
                           });
+ if($allmessages){
+       $template->param(allmessages => 1);
+ }
+ 
  $template->param(     genbrname => $genbrname,
                                                                genprname => 
$genprname,
***************
*** 258,262 ****
                                                                reserved => 
$reserved,
                                                                waiting => 
$waiting,
!                                                               name => $name,
                                                                bornum => 
$bornum,
                                                                borcnum => 
$borcnum,
--- 289,300 ----
                                                                reserved => 
$reserved,
                                                                waiting => 
$waiting,
!                                                               title => $title,
!                                                               surname => 
$surname,
!                                                               firstname => 
$firstname,
!                                                               borphone => 
$borphone,
!                                                               borstraddress 
=> $borstraddress,
!                                                               borcity => 
$borcity,
!                                                               borzip => 
$borzip,
!                                                               boremail => 
$boremail,
                                                                bornum => 
$bornum,
                                                                borcnum => 
$borcnum,
***************
*** 269,272 ****
--- 307,311 ----
                                                                cancelled => 
$cancelled,
                                                                setwaiting => 
$setwaiting,
+                                                               wastransferred 
=> $wastransferred,
                                                                trsfitemloop => 
address@hidden,
                                                                
branchoptionloop => address@hidden,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]