Changeset 818

Show
Ignore:
Timestamp:
01/18/07 13:51:39 (2 years ago)
Author:
ben
Message:

The search box has been moved to the page header; it can be fully translated and moved around with the {{searchbox}} keyword.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/template/templates/Default_Template/pageshell

    r813 r818  
    1313                <h2>{{tagline}}</h2> 
    1414        </div><!-- close div logo --> 
    15         <div id="search-header"><!-- open search-header div --> 
    16             <form id="searchform" action=""> 
    17                                                 <p><input type="text" size="20" name="tag" value="search" /> 
    18                                                 <select name="user_type"> 
    19                                                         <option value="">-- all --</option> 
    20  
    21                                                         <option value="person">People</option> 
    22                                                         <option value="community">Communities</option> 
    23                                                 </select> 
    24                                                 <input type="submit" value="Go" /><span><br />[<a href=""><b>Tag cloud</b></a>]</span></p> 
    25             </form> 
    26         </div><!-- close search-header div --> 
     15        {{searchbox}} 
    2716</div><!-- close div header --> 
    2817<div id="content-holder"><!-- open content-holder div -->  
  • devel/mod/toolbar/lib.php

    r810 r818  
    77        global $CFG, $template; 
    88        $CFG->templates->variables_substitute['toolbar'][] = "toolbar_mainbody"; 
     9        $CFG->templates->variables_substitute['searchbox'][] = "toolbar_searchbox"; 
    910    } 
    1011     
     
    2021         
    2122    } 
     23     
     24    function toolbar_searchbox($vars) { 
     25         
     26        global $CFG; 
     27        $all = __gettext("all"); 
     28        $people = __gettext("People"); 
     29        $communities = __gettext("Communities"); 
     30        $tagcloud = __gettext("Tag cloud"); 
     31         
     32        $searchbox = <<< END 
     33         
     34        <div id="search-header"><!-- open search-header div --> 
     35            <form id="searchform" action="{$CFG->wwwroot}search/index.php" method="get"> 
     36                                                <p><input type="text" size="20" name="tag" value="search" /> 
     37                                                <select name="user_type"> 
     38                                                        <option value="">-- {$all} --</option> 
     39 
     40                                                        <option value="person">{$people}</option> 
     41                                                        <option value="community">{$communities}</option> 
     42                                                </select> 
     43                                                <input type="submit" value="Go" /><span><br />[<a href="{$CFG->wwwroot}search/tags.php"><b>{$tagcloud}</b></a>]</span></p> 
     44            </form> 
     45        </div><!-- close search-header div --> 
     46         
     47END; 
     48 
     49        return $searchbox; 
     50         
     51    } 
    2252 
    2353?> 
  • devel/units/search/main.php

    r269 r818  
    2020         
    2121    // Log on bar down the right hand side 
    22         $function['display:sidebar'][] = path . "units/search/search_user_info_menu.php"; 
     22        // $function['display:sidebar'][] = path . "units/search/search_user_info_menu.php"; 
    2323     
    2424    // Actions to perform when an access group is deleted