30 global
$lng,$objDefinition,$tree;
34 if(isset(
$_GET[
'ref_id']))
36 $this->ref_id = (int )
$_GET[
'ref_id'];
41 $lng->loadLanguageModule(
"search");
58 if(!$this->isContainer)
62 if(
$_GET[
'baseClass'] ==
'ilSearchController')
67 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
68 ilYuiUtil::initAutocomplete();
69 $this->tpl =
new ilTemplate(
'tpl.main_menu_search.html',
true,
true,
'Services/Search');
70 $this->tpl->setVariable(
'FORMACTION',
'ilias.php?baseClass=ilSearchController&cmd=post'.
71 '&rtoken='.$ilCtrl->getRequestToken().
'&fallbackCmd=remoteSearch');
72 $this->tpl->setVariable(
'BTN_SEARCH',$this->lng->txt(
'search'));
73 $this->tpl->setVariable(
'CONT_REF_ID',ROOT_FOLDER_ID);
74 $this->tpl->setVariable(
'ID_AUTOCOMPLETE',
"mm_sr_auto");
75 $this->tpl->setVariable(
'YUI_DATASOURCE',
"ilias.php?baseClass=ilSearchController&cmd=autoComplete");
83 if ($ilUser->getId() != ANONYMOUS_USER_ID)
85 include_once(
"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
87 $list->addEntry($lng->txt(
"last_search_result"),
"ilias.php?baseClass=ilSearchController");
88 $this->tpl->setVariable(
'SEARCH_LINK_MENU', $list->getHTML());
89 $this->tpl->setVariable(
'TXT_SEARCH', $lng->txt(
"search"));
90 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
95 $ov->setAutoHide(
false);
99 return $this->tpl->get();