}
);
-my $search_on = $cgi->param('search_on');
-my %params;
-if ($search_on) {
- $params{'course_name'} = "%$search_on%";
-}
-
-my $courses = GetCourses(%params);
-if ( $search_on && @$courses == 1 ) {
- print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=" . $courses->[0]->{'course_id'});
-} else {
- $template->param( courses => $courses );
- output_html_with_http_headers $cgi, $cookie, $template->output;
-}
+my $courses = GetCourses();
+$template->param( courses => $courses );
+output_html_with_http_headers $cgi, $cookie, $template->output;
</div><!-- /toolbar -->
[% END %]
- <!--
- <div id="search-toolbar">
- <script type="text/javascript">
- //<![CDATA[
- function submitSearchForm(p_oEvent){
- $('#search_courses_form').submit();
- }
-
- $(document).ready(function(){
- newCourseButton = new YAHOO.widget.Button("search_courses");
- newCourseButton.on("click", submitSearchForm );
- });
- //]]>
- </script>
- <ul class="toolbar">
- <li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li>
- <li><a id="search_courses">Search courses</a></li>
- </ul>
- </div>
- -->
-
<h1>Courses</h1>
<table id="course_reserves_table">
<thead>