24 include_once(
'classes/class.ilLink.php');
54 $this->type_ordering = array(
55 "cat",
"crs",
"grp",
"chat",
"frm",
"wiki",
"lres",
56 "glo",
"webr",
"file",
'mcst',
"exc",
57 "tst",
"svy",
"sess",
"mep",
"qpl",
"spl");
61 include_once(
'Services/Search/classes/class.ilUserSearchCache.php');
68 $results = $this->result->getResultsForPresentation();
77 global $objDefinition;
85 foreach($this->type_ordering as $act_type)
91 foreach(
$results[$act_type] as $key => $item)
94 if ($cur_obj_type != $item[
"type"])
96 include_once
'Services/Search/classes/class.ilSearchObjectListFactory.php';
101 $html = $item_list_gui->getListItemHTML(
105 $item[
"description"]);
110 $item_html[$item[
"ref_id"]] = $html;
114 if(count($item_html) > 0)
128 foreach($item_html as
$ref_id => $html)
149 if ($a_type !=
"lres")
152 $title = $this->lng->txt(
"objs_".$a_type);
157 $title = $this->lng->txt(
"learning_resources");
160 $a_tpl->setCurrentBlock(
"container_header_row_image");
161 $a_tpl->setVariable(
"HEADER_IMG", $icon);
162 $a_tpl->setVariable(
"HEADER_ALT",
$title);
163 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT",
$title);
164 $a_tpl->parseCurrentBlock();
167 #$a_tpl->setCurrentBlock("container_header_row");
168 #$a_tpl->parseCurrentBlock();
169 #$a_tpl->touchBlock("container_row");
174 $this->cur_row_type =
"";
186 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
190 $a_tpl->touchBlock($this->cur_row_type);
191 $a_tpl->setCurrentBlock(
"container_standard_row");
192 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
196 $a_tpl->setVariable(
"ITEM_ID",$a_ref_id);
197 $a_tpl->parseCurrentBlock();
198 $a_tpl->touchBlock(
"container_row");
209 $tpl =&
new ilTemplate (
"tpl.container_list_block.html",
true,
true,
210 "Services/Container");
211 $this->cur_row_type =
"row_type_1";
218 $a_tpl->touchBlock(
"separator_row");
219 $a_tpl->touchBlock(
"container_row");
224 if(!count($item[
'child']))
228 $tpl =
new ilTemplate(
'tpl.detail_links.html',
true,
true,
'Services/Search');
229 $tpl->setVariable(
"HITS",$this->lng->txt(
'search_hits'));
231 switch($item[
'type'])
234 include_once
'Modules/LearningModule/classes/class.ilLMObject.php';
235 foreach($item[
'child'] as $child)
237 $tpl->setCurrentBlock(
"link_row");
242 $tpl->setVariable(
"CHAPTER_PAGE",$this->lng->txt(
'obj_pg'));
245 $tpl->setVariable(
"CHAPTER_PAGE",$this->lng->txt(
'obj_st'));
248 $item_list_gui->setChildId($child);
249 $tpl->setVariable(
"SEPERATOR",
' -> ');
250 $tpl->setVariable(
"LINK",$item_list_gui->getCommandLink(
'page'));
251 $tpl->setVariable(
"TARGET",$item_list_gui->getCommandFrame(
'page'));
253 $tpl->parseCurrentBlock();
258 include_once
'./Modules/Forum/classes/class.ilObjForum.php';
260 foreach($item[
'child'] as $child)
262 $thread_post = explode(
'_',$child);
264 $tpl->setCurrentBlock(
"link_row");
265 $tpl->setVariable(
"CHAPTER_PAGE",$this->lng->txt(
'thread'));
267 $item_list_gui->setChildId($thread_post);
268 $tpl->setVariable(
"SEPERATOR",
': ');
269 $tpl->setVariable(
"LINK",$item_list_gui->getCommandLink(
'posting'));
270 $tpl->setVariable(
"TARGET",$item_list_gui->getCommandFrame(
''));
272 $tpl->parseCurrentBlock();
277 include_once
'./Modules/Glossary/classes/class.ilGlossaryTerm.php';
279 $this->lng->loadLanguageModule(
'content');
280 foreach($item[
'child'] as $child)
282 $tpl->setCurrentBlock(
"link_row");
283 $tpl->setVariable(
"CHAPTER_PAGE",$this->lng->txt(
'cont_term'));
284 $tpl->setVariable(
"SEPERATOR",
': ');
285 $tpl->setVariable(
"LINK",
ilLink::_getLink($item[
'ref_id'],
'git',array(
'target' =>
'git_'.$child.
'_'.$item[
'ref_id'])));
287 $tpl->parseCurrentBlock();
292 include_once
'./Modules/Wiki/classes/class.ilWikiPage.php';
293 include_once
'./Modules/Wiki/classes/class.ilWikiUtil.php';
295 $this->lng->loadLanguageModule(
'wiki');
296 foreach($item[
'child'] as $child)
299 $tpl->setCurrentBlock(
"link_row");
300 $tpl->setVariable(
"CHAPTER_PAGE",$this->lng->txt(
'wiki_page'));
301 $tpl->setVariable(
"SEPERATOR",
': ');
304 $tpl->setVariable(
"TITLE", $page_title);
305 $tpl->parseCurrentBlock();
310 include_once(
"./Services/News/classes/class.ilNewsItem.php");
312 foreach($item[
'child'] as $child)
314 $tpl->setCurrentBlock(
"link_row");
317 $item_list_gui->setChildId($child);
319 $tpl->setVariable(
"LINK", $item_list_gui->getCommandLink(
'listItems'));
320 $tpl->setVariable(
"TARGET", $item_list_gui->getCommandFrame(
''));
322 $tpl->parseCurrentBlock();
329 return $html .
$tpl->get();