3 # Parts Copyright Biblibre 2010
4 # This file is part of Koha.
6 # Koha is free software; you can redistribute it and/or modify it under the
7 # terms of the GNU General Public License as published by the Free Software
8 # Foundation; either version 2 of the License, or (at your option) any later
11 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License along
16 # with Koha; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 use Koha
::Borrower
::Modifications
;
32 my $branch = $query->param('branchcode');
34 $branch = q{} unless defined $branch;
36 my ($template, $loggedinuser, $cookie)
37 = get_template_and_user
({template_name
=> "members/member.tt",
41 flagsrequired
=> {borrowers
=> 1},
45 my $branches = GetBranches
;
47 if ( C4
::Branch
::onlymine
) {
48 my $userenv = C4
::Context
->userenv;
49 my $branch = C4
::Branch
::GetBranchDetail
( $userenv->{'branch'} );
51 value
=> $branch->{branchcode
},
52 branchcode
=> $branch->{branchcode
},
53 branchname
=> $branch->{branchname
},
57 foreach (sort { $branches->{$a}->{branchname
} cmp $branches->{$b}->{branchname
} } keys %{$branches}) {
59 $selected = 1 if $branch and $branch eq $_;
63 branchname
=> $branches->{$_}->{branchname
},
72 if(scalar(@branchloop) < 1){
74 $template->param(no_branches
=> 1);
77 $template->param(branchloop
=>\
@branchloop);
80 @categories=C4
::Category
->all;
81 if(scalar(@categories) < 1){
85 if($no_categories && C4
::Context
->preference("AddPatronLists")=~/code/){
87 $template->param(no_categories
=> 1);
90 $template->param(categories
=>\
@categories);
94 my $pending_borrower_modifications =
95 Koha
::Borrower
::Modifications
->GetPendingModificationsCount( $branch );
99 pending_borrower_modifications
=> $pending_borrower_modifications,
103 alphabet
=> C4
::Context
->preference('alphabet') || join (' ', 'A' .. 'Z'),
104 PatronsPerPage
=> C4
::Context
->preference("PatronsPerPage") || 20,
107 output_html_with_http_headers
$query, $cookie, $template->output;