4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
20 function __construct($a_parent_obj, $a_parent_cmd, $a_presenter)
24 $this->
setId(
"ilSearchResultsTable");
26 $this->presenter = $a_presenter;
28 $this->
setTitle($lng->txt(
"search_results"));
33 #$this->addColumn($this->lng->txt("type"), "type", "1");
34 #$this->addColumn($this->lng->txt("search_title_description"), "title_sort");
35 $this->
addColumn($this->lng->txt(
"type"),
"type",
"1");
36 $this->
addColumn($this->lng->txt(
"search_title_description"),
"title");
39 #$this->addColumn($this->lng->txt('lucene_relevance_short'),'s_relevance','50px');
40 $this->
addColumn($this->lng->txt(
'lucene_relevance_short'),
'relevance',
'50px');
44 $this->
addColumn($this->lng->txt(
"actions"),
"",
"10px");
48 $this->
setRowTemplate(
"tpl.search_result_row.html",
"Services/Search");
53 include_once
"Services/Object/classes/class.ilObjectActivation.php";
73 global
$lng, $objDefinition;
75 $obj_id = $a_set[
"obj_id"];
77 $type = $a_set[
'type'];
79 $description = $a_set[
'description'];
80 $relevance = $a_set[
'relevance'];
87 include_once
'./Services/Search/classes/Lucene/class.ilLuceneSearchObjectListGUIFactory.php';
89 $item_list_gui->initItem(
$ref_id,$obj_id,
$title,$description);
90 $item_list_gui->setContainerObject($this->parent_obj);
91 $item_list_gui->setSearchFragment($this->presenter->lookupContent($obj_id,0));
92 $item_list_gui->setSeparateCommands(
true);
96 $this->presenter->appendAdditionalInformation($item_list_gui,
$ref_id,$obj_id,$type);
98 $this->tpl->setVariable(
"ACTION_HTML", $item_list_gui->getCommandsHTML());
100 if($html = $item_list_gui->getListItemHTML(
$ref_id,$obj_id,
$title,$description))
102 $item_html[
$ref_id][
'html'] = $html;
103 $item_html[
$ref_id][
'type'] = $type;
106 $this->tpl->setVariable(
"HREF_IMG", $item_list_gui->default_command[
"link"]);
112 include_once
"Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php";
114 $pbar->setCurrent($relevance);
116 $this->tpl->setCurrentBlock(
'relev');
117 $this->tpl->setVariable(
'REL_PBAR', $pbar->render());
118 $this->tpl->parseCurrentBlock();
121 $this->tpl->setVariable(
"ITEM_HTML", $html);
123 if(!$objDefinition->isPlugin($type))
125 $type_txt = $lng->txt(
'icon').
' '.$lng->txt(
'obj_'.$type);
130 include_once(
"./Services/Component/classes/class.ilPlugin.php");
135 $this->tpl->setVariable(