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.
31 my $branch = $query->param('branchcode');
34 my ($template, $loggedinuser, $cookie)
35 = get_template_and_user
({template_name
=> "members/member.tmpl",
39 flagsrequired
=> {borrowers
=> 1},
43 my $branches = GetBranches
;
45 foreach (sort { $branches->{$a}->{branchname
} cmp $branches->{$b}->{branchname
} } keys %$branches) {
46 my $selected = 1 if $branches->{$_}->{branchcode
} eq $branch;
47 my %row = ( value
=> $_,
48 selected
=> $selected,
49 branchname
=> $branches->{$_}->{branchname
},
51 push @branchloop, \
%row;
57 if(scalar(@branchloop) < 1){
59 $template->param(no_branches
=> 1);
62 $template->param(branchloop
=>\
@branchloop);
65 @categories=C4
::Category
->all;
66 if(scalar(@categories) < 1){
70 if($no_categories && C4
::Context
->preference("AddPatronLists")=~/code/){
72 $template->param(no_categories
=> 1);
75 $template->param(categories
=>\
@categories);
79 "AddPatronLists_".C4
::Context
->preference("AddPatronLists")=> "1",
82 my @letters = map { {letter
=> $_} } ( 'A' .. 'Z');
83 $template->param( letters
=> \
@letters );
85 output_html_with_http_headers
$query, $cookie, $template->output;