Permalink
Browse files

Use a shorter course search page on front page, for small screens

  • Loading branch information...
1 parent 16b8fe5 commit e4027ac98208f062bc5751ae031f64fff4cbf406 moodler committed Sep 9, 2003
Showing with 8 additions and 2 deletions.
  1. +8 −2 course/lib.php
View
@@ -1,4 +1,4 @@
-<? // $Id$
+<?php // $Id$
// Library of useful functions
@@ -1185,7 +1185,7 @@ function print_my_moodle() {
}
echo "<table width=\"100%\"><tr><td align=\"center\">";
- print_course_search();
+ print_course_search("", false, "short");
echo "</td><td align=\"center\">";
print_single_button("$CFG->wwwroot/course/index.php", NULL, get_string("fulllistofcourses"), "get");
echo "</td></tr></table>\n";
@@ -1213,6 +1213,12 @@ function print_course_search($value="", $return=false, $format="plain") {
$output .= "<input type=\"text\" size=30 name=\"search\" value=\"$value\">";
$output .= "<input type=\"submit\" value=\"$strsearchcourses\">";
$output .= "</form></p></center>";
+ } else if ($format == "short") {
+ $output = "<center><p align=\"center\" class=\"coursesearchbox\">";
+ $output .= "<form name=\"coursesearch\" action=\"$CFG->wwwroot/course/search.php\" method=\"get\">";
+ $output .= "<input type=\"text\" size=12 name=\"search\" value=\"$value\">";
+ $output .= "<input type=\"submit\" value=\"$strsearchcourses\">";
+ $output .= "</form></p></center>";
} else if ($format == "navbar") {
$output = "<table border=0 cellpadding=0 cellspacing=0><tr><td nowrap>";
$output .= "<form name=\"coursesearch\" action=\"$CFG->wwwroot/course/search.php\" method=\"get\">";

0 comments on commit e4027ac

Please sign in to comment.