4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
20 function __construct($a_parent_obj, $a_parent_cmd, $a_presenter)
24 $this->presenter = $a_presenter;
26 $this->
setTitle($lng->txt(
"search_results"));
31 #$this->addColumn($this->lng->txt("type"), "type", "1");
32 #$this->addColumn($this->lng->txt("search_title_description"), "title_sort");
33 $this->
addColumn($this->lng->txt(
"type"),
"",
"1");
34 $this->
addColumn($this->lng->txt(
"search_title_description"),
"");
37 #$this->addColumn($this->lng->txt('lucene_relevance_short'),'s_relevance','50px');
38 $this->
addColumn($this->lng->txt(
'lucene_relevance_short'),
'',
'50px');
42 $this->
addColumn($this->lng->txt(
"actions"),
"",
"10px");
46 $this->
setRowTemplate(
"tpl.search_result_row.html",
"Services/Search");
57 global
$lng, $objDefinition;
59 $obj_id = $a_set[
"obj_id"];
61 $type = $a_set[
'type'];
63 $description = $a_set[
'description'];
64 $relevance = $a_set[
'relevance'];
71 include_once
'./Services/Search/classes/Lucene/class.ilLuceneSearchObjectListGUIFactory.php';
73 $item_list_gui->initItem(
$ref_id,$obj_id,
$title,$description);
74 $item_list_gui->setContainerObject($this->parent_obj);
75 $item_list_gui->setSearchFragment($this->presenter->lookupContent($obj_id,0));
76 $item_list_gui->setSeparateCommands(
true);
78 $this->presenter->appendAdditionalInformation($item_list_gui,
$ref_id,$obj_id,$type);
80 $this->tpl->setVariable(
"ACTION_HTML", $item_list_gui->getCommandsHTML());
82 if($html = $item_list_gui->getListItemHTML(
$ref_id,$obj_id,
$title,$description))
84 $item_html[
$ref_id][
'html'] = $html;
85 $item_html[
$ref_id][
'type'] = $type;
92 $width1 = (int) ((
int) $relevance / 2);
93 $width2 = (int) ((50 - $width1));
95 $this->tpl->setCurrentBlock(
'relev');
96 $this->tpl->setVariable(
'VAL_REL',sprintf(
"%d %%",$relevance));
97 $this->tpl->setVariable(
'WIDTH_A',$width1);
98 $this->tpl->setVariable(
'WIDTH_B',$width2);
101 $this->tpl->parseCurrentBlock();
104 $this->tpl->setVariable(
"ITEM_HTML", $html);
106 if(!$objDefinition->isPlugin($type))
108 $type_txt = $lng->txt(
'icon').
' '.$lng->txt(
'obj_'.$type);
113 include_once(
"./Services/Component/classes/class.ilPlugin.php");
118 $this->tpl->setVariable(