http://www.atutor.ca/atutor/mantis/view.php?id=4457
authorCindy Li <cli@ocad.ca>
Tue, 10 Aug 2010 14:32:31 +0000 (14:32 -0000)
committerCindy Li <cli@ocad.ca>
Tue, 10 Aug 2010 14:32:31 +0000 (14:32 -0000)
docs/include/header.inc.php
docs/themes/default/include/header.tmpl.php
docs/themes/default/styles.css

index 1301c9d..4a8d51f 100644 (file)
@@ -99,8 +99,8 @@ if (isset($course_base_href) || isset($content_base_href)) {
 }
 
 // Setup array of content tools for shortcuts tool bar.
-
 $savant->assign('tool_shortcuts', $_tool_shortcuts);  // array of content tools for shortcuts tool bar.
+
 $savant->assign('content_base_href', $_tmp_base_href);
 $savant->assign('lang_code', $_SESSION['lang']);
 $savant->assign('lang_charset', $myLang->getCharacterSet());
@@ -110,6 +110,11 @@ $savant->assign('theme', $_SESSION['prefs']['PREF_THEME']);
 $theme_img  = $_base_path . 'themes/'. $_SESSION['prefs']['PREF_THEME'] . '/images/';
 $savant->assign('img', $theme_img);
 
+// course categories for search tool
+require_once(TR_INCLUDE_PATH.'classes/DAO/CourseCategoriesDAO.class.php');
+$courseCategoriesDAO = new CourseCategoriesDAO();
+$savant->assign('categories', $courseCategoriesDAO->getAll());
+
 // get custom css
 $custom_css = '';
 if (isset($_custom_css)) {
index 29f375b..3dd967d 100644 (file)
@@ -179,20 +179,16 @@ foreach ($this->top_level_pages as $page) {
       <form target="_top" action="<?php echo TR_BASE_HREF; ?>home/search.php" method="get">
         <input type="text" name="search_text" id="search_text_at_header" value="<?php if (isset($_GET['search_text'])) echo $_GET['search_text']; ?>" size="25" />
       
-<?php 
-
-if (is_array($this->categories)) { // print category dropdown list box?>
-    <select name="catid">
-      <option value="" <?php if (!isset($_GET['catid']) || $_GET['catid'] == '') echo 'selected="selected"'; ?>><?php echo _AT('all_categories'); ?></option>
-      <option value="">---------------------------------</option>
+<?php if (is_array($this->categories)) { // print category dropdown list box?>
+        <select name="catid">
+          <option value="" <?php if (!isset($_GET['catid']) || $_GET['catid'] == '') echo 'selected="selected"'; ?>><?php echo _AT('all_categories'); ?></option>
+          <option value="">---------------------------------</option>
 <?php foreach ($this->categories as $category) {?>
-      <option value="<?php echo $category['category_id']; ?>" <?php if ($_GET['catid'] == $category['category_id']) echo 'selected'; ?>><?php echo $category['category_name']; ?></option>
+          <option value="<?php echo $category['category_id']; ?>" <?php if ($_GET['catid'] == $category['category_id']) echo 'selected'; ?>><?php echo $category['category_name']; ?></option>
 <?php }?>
-      <option value="0" <?php if ($_GET['catid'] == 0 && $_GET['catid'] <> '') echo 'selected'; ?>><?php echo _AT('cats_uncategorized'); ?></option>
-    </select>
+          <option value="0" <?php if ($_GET['catid'] == 0 && $_GET['catid'] <> '') echo 'selected'; ?>><?php echo _AT('cats_uncategorized'); ?></option>
+        </select>
 <?php }?>
-        
-        
         <input type="submit" name="search" value="<?php echo _AT("search"); ?>" />
       </form>
       </div>
index e6df9fd..2c08aa2 100644 (file)
@@ -1208,7 +1208,7 @@ ul.navigation li a.active{
 .search_top{
 white-space:nowrap;
 font-size:.8em;
-width:33em;
+margin-right:1em;
 float:right;
 
 }