View | Details | Raw Unified | Return to bug 21501
Collapse All | Expand All

(-)a/course_reserves/course-reserves.pl (-13 / +3 lines)
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
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt (-22 lines)
Lines 28-54 Link Here
28
                    </div><!-- /toolbar -->
28
                    </div><!-- /toolbar -->
29
                    [% END %]
29
                    [% END %]
30
30
31
                    <!--
32
                    <div id="search-toolbar">
33
                        <script type="text/javascript">
34
                        //<![CDATA[
35
                            function submitSearchForm(p_oEvent){
36
                                $('#search_courses_form').submit();
37
                            }
38
39
                            $(document).ready(function(){
40
                                newCourseButton = new YAHOO.widget.Button("search_courses");
41
                                newCourseButton.on("click", submitSearchForm );
42
                            });
43
                        //]]>
44
                        </script>
45
                        <ul class="toolbar">
46
                            <li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li>
47
                            <li><a id="search_courses">Search courses</a></li>
48
                        </ul>
49
                    </div>
50
                    -->
51
52
                    <h1>Courses</h1>
31
                    <h1>Courses</h1>
53
                    <table id="course_reserves_table">
32
                    <table id="course_reserves_table">
54
                        <thead>
33
                        <thead>
55
- 

Return to bug 21501