Browse Source

Bug 21501: Remove dead code from course reserves module

search_on parameter is not used in any templates so course-reserves.pl
can be simplified a bit

Test plan:
1. Go to course reserves module and verify that it is still working
2. `git grep search_on` should return nothing

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Julian Maurice 3 years ago
committed by Nick Clemens
parent
commit
84857caaef
  1. 16
      course_reserves/course-reserves.pl
  2. 21
      koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt

16
course_reserves/course-reserves.pl

@ -39,16 +39,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
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;

21
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt

@ -29,27 +29,6 @@
</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>

Loading…
Cancel
Save