]> git.mjollnir.org Git - moodle.git/commitdiff
Use a shorter course search page on front page, for small screens
authormoodler <moodler>
Tue, 9 Sep 2003 08:37:48 +0000 (08:37 +0000)
committermoodler <moodler>
Tue, 9 Sep 2003 08:37:48 +0000 (08:37 +0000)
course/lib.php

index 520d32e9bcf7253ac50200a3b4514e234f96411e..674d09983f9d52dcd382f67fa5d33787e1d234ed 100644 (file)
@@ -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\">";