Lines 39-54
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
39 |
} |
39 |
} |
40 |
); |
40 |
); |
41 |
|
41 |
|
42 |
my $search_on = $cgi->param('search_on'); |
42 |
my $courses = GetCourses(); |
43 |
my %params; |
43 |
$template->param( courses => $courses ); |
44 |
if ($search_on) { |
44 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
45 |
$params{'course_name'} = "%$search_on%"; |
|
|
46 |
} |
47 |
|
48 |
my $courses = GetCourses(%params); |
49 |
if ( $search_on && @$courses == 1 ) { |
50 |
print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=" . $courses->[0]->{'course_id'}); |
51 |
} else { |
52 |
$template->param( courses => $courses ); |
53 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
54 |
} |