porting 22 fixes to head
authortipaul <tipaul>
Fri, 9 Sep 2005 10:04:55 +0000 (10:04 +0000)
committertipaul <tipaul>
Fri, 9 Sep 2005 10:04:55 +0000 (10:04 +0000)
koha-tmpl/intranet-tmpl/default/en/members/member.tmpl
members/member.pl
members/memberentry.pl

index 3fefd1a..c257360 100644 (file)
@@ -23,8 +23,8 @@
                <tr>
                        <th>&nbsp;</th>
                        <th>Card</th>
-                       <th>Surname</th>
-                       <th>Firstname</th>
+                       <th>Name</th>
+                       <th>Branch</th>
                        <th>Category</th>
                        <th>Address</th>
                        <th>OD/Issues</th>
@@ -39,8 +39,8 @@
                        <!-- /TMPL_IF -->
                                <td><!-- TMPL_VAR NAME="count" --></td>
                                <td><!-- TMPL_VAR NAME="cardnumber" --></td>
-                               <td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" --></a></td>
-                               <td><!-- TMPL_VAR NAME="firstname" --></a></td>
+                               <td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a></td>
+                               <td><!-- TMPL_VAR name="branchcode" --></td>
                                <td><!-- TMPL_VAR NAME="categorycode" --></td>
                                <td><!-- TMPL_VAR NAME="streetaddress" --> <!-- TMPL_VAR NAME="city" --></td>
                                <td><!-- TMPL_VAR NAME="odissue" --></td>
index 45948e2..e01b4bf 100755 (executable)
@@ -97,6 +97,7 @@ for (my $i=0; $i < $count; $i++){
         categorycode => $results->[$i]{'categorycode'},
         streetaddress => $results->[$i]{'streetaddress'},
         city => $results->[$i]{'city'},
+        branchcode => $results->[$i]{'branchcode'},
         odissue => "$od/$issue",
         fines => $fines,
         borrowernotes => $results->[$i]{'borrowernotes'});
index 3fdae88..7f27125 100755 (executable)
@@ -158,6 +158,14 @@ if ($delete){
        } else {
                $data=borrdata('',$borrowernumber);
        }
+       if (C4::Context->preference("IndependantBranches")) {
+               my $userenv = C4::Context->userenv;
+               if ($userenv->{flags} != 1 && $data->{branchcode}){
+                       unless ($userenv->{branch} eq $data->{'branchcode'}){
+                               print $input->redirect("/cgi-bin/koha/members/members-home.pl");
+                       }
+               }
+       }
        if ($actionType eq 'Add'){
                $template->param( updtype => 'I');
        } else {