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 parent::__construct($a_parent_obj, $a_parent_cmd);
29 $this->
setTitle($lng->txt(
"search_results"));
34 #$this->addColumn($this->lng->txt("type"), "type", "1"); 35 #$this->addColumn($this->lng->txt("search_title_description"), "title_sort"); 36 $this->
addColumn($this->lng->txt(
"type"),
"type",
"1");
37 $this->
addColumn($this->lng->txt(
"search_title_description"),
"title");
42 $this->
addColumn($all_cols[$col][
'txt'], $col,
'50px');
47 #$this->addColumn($this->lng->txt('lucene_relevance_short'),'s_relevance','50px'); 48 $this->
addColumn($this->lng->txt(
'lucene_relevance_short'),
'relevance',
'50px');
54 $this->
addColumn($this->lng->txt(
"actions"),
"",
"10px");
58 $this->
setRowTemplate(
"tpl.search_result_row.html",
"Services/Search");
64 include_once
"Services/Object/classes/class.ilObjectActivation.php";
76 return parent::numericOrdering($a_field);
88 return array(
'create_date' =>
90 'txt' => $this->lng->txt(
'create_date'),
102 global
$lng, $objDefinition;
104 $obj_id = $a_set[
"obj_id"];
106 $type = $a_set[
'type'];
108 $description = $a_set[
'description'];
109 $relevance = $a_set[
'relevance'];
116 include_once
'./Services/Search/classes/Lucene/class.ilLuceneSearchObjectListGUIFactory.php';
118 $item_list_gui->initItem(
$ref_id,$obj_id,
$title,$description);
119 $item_list_gui->setContainerObject($this->parent_obj);
120 $item_list_gui->setSearchFragment($this->presenter->lookupContent($obj_id,0));
121 $item_list_gui->setSeparateCommands(
true);
125 $this->presenter->appendAdditionalInformation($item_list_gui,
$ref_id,$obj_id,$type);
127 $this->tpl->setVariable(
"ACTION_HTML", $item_list_gui->getCommandsHTML());
132 $item_html[
$ref_id][
'type'] = $type;
135 $this->tpl->setVariable(
"HREF_IMG", $item_list_gui->default_command[
"link"]);
141 include_once
"Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php";
143 $pbar->setCurrent($relevance);
145 $this->tpl->setCurrentBlock(
'relev');
146 $this->tpl->setVariable(
'REL_PBAR', $pbar->render());
147 $this->tpl->parseCurrentBlock();
151 $this->tpl->setVariable(
"ITEM_HTML",
$html);
158 $this->tpl->setCurrentBlock(
'creation');
160 $this->tpl->parseCurrentBlock();
166 if(!$objDefinition->isPlugin($type))
168 $type_txt = $lng->txt(
'icon').
' '.$lng->txt(
'obj_'.$type);
173 include_once(
"./Services/Component/classes/class.ilPlugin.php");
178 $this->tpl->setVariable(
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setEnableNumInfo($a_val)
Set enable num info.
getSelectableColumns()
Get selectable columns.
TableGUI class for search results.
enabledRelevance()
Check if relevance is visible.
_lookupCreationDate($a_id)
Lookup creation date.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static lookupTxt($a_mod_prefix, $a_pl_id, $a_lang_var)
Lookup language text.
static getInstance()
Factory.
static formatDate(ilDateTime $date)
Format a date public.
getSelectedColumns()
Get selected columns.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
__construct($a_parent_obj, $a_parent_cmd, $a_presenter)
Constructor.
numericOrdering($a_field)
setEnableHeader($a_enableheader)
Set Enable Header.
fillRow($a_set)
Fill table row.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
setEnableTitle($a_enabletitle)
Set Enable Title.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setLimit($a_limit=0, $a_default_limit=0)
static factory($a_type)
Get list gui by type This method caches all the returned list guis.