my @categories=C4::Category->all;
my %categories_display;
+my $no_categories;
foreach my $category (@categories) {
my $hash={
$categories_display{$$category{categorycode}} = $hash;
}
+
my ($template, $loggedinuser, $cookie) = get_template_and_user({
- template_name => "patroncards/members-search.tmpl",
+ template_name => "patroncards/members-search.tt",
query => $cgi,
type => "intranet",
authnotrequired => 0,
flagsrequired => {borrowers => 1},
debug => 1,});
+if(scalar(@categories) < 1){ $no_categories = 1; }
+if($no_categories && C4::Context->preference("AddPatronLists")=~/code/){
+ $template->param(no_categories => 1);
+} else {
+ $template->param(
+ categories=>\@categories,
+ category => $category
+ );
+}
+
$orderby = "surname,firstname" unless $orderby;
$member =~ s/,//g; #remove any commas from search string
$member =~ s/\*/%/g;
$template->param( batch_id => $batch_id);
}
+$template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' );
+
output_html_with_http_headers $cgi, $cookie, $template->output;
__END__