4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
21 public function __construct($a_parent_obj, $a_parent_cmd, $a_presenter)
27 $ilAccess = $DIC[
'ilAccess'];
30 $this->
setId(
"ilSearchResultsTable");
32 $this->presenter = $a_presenter;
34 parent::__construct($a_parent_obj, $a_parent_cmd);
40 #$this->addColumn($this->lng->txt("type"), "type", "1"); 41 #$this->addColumn($this->lng->txt("search_title_description"), "title_sort"); 42 $this->
addColumn($this->lng->txt(
"type"),
"type",
"1");
43 $this->
addColumn($this->lng->txt(
"search_title_description"),
"title");
47 $this->
addColumn($all_cols[$col][
'txt'], $col,
'50px');
51 #$this->addColumn($this->lng->txt('lucene_relevance_short'),'s_relevance','50px'); 52 $this->
addColumn($this->lng->txt(
'lucene_relevance_short'),
'relevance',
'50px');
58 $this->
addColumn($this->lng->txt(
"actions"),
"",
"10px");
62 $this->
setRowTemplate(
"tpl.search_result_row.html",
"Services/Search");
68 include_once
"Services/Object/classes/class.ilObjectActivation.php";
79 return parent::numericOrdering($a_field);
93 return array(
'create_date' =>
95 'txt' => $this->lng->txt(
'create_date'),
110 $objDefinition = $DIC[
'objDefinition'];
112 $obj_id = $a_set[
"obj_id"];
113 $ref_id = $a_set[
"ref_id"];
114 $type = $a_set[
'type'];
117 $relevance = $a_set[
'relevance'];
123 include_once
'./Services/Search/classes/Lucene/class.ilLuceneSearchObjectListGUIFactory.php';
126 $item_list_gui->setContainerObject($this->parent_obj);
127 $item_list_gui->setSearchFragment($this->presenter->lookupContent($obj_id, 0));
128 $item_list_gui->setSeparateCommands(
true);
132 $this->presenter->appendAdditionalInformation($item_list_gui, $ref_id, $obj_id,
$type);
134 $this->tpl->setVariable(
"ACTION_HTML", $item_list_gui->getCommandsHTML());
137 $item_html[$ref_id][
'html'] =
$html;
138 $item_html[$ref_id][
'type'] =
$type;
146 include_once
"Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php";
148 $pbar->setCurrent($relevance);
150 $this->tpl->setCurrentBlock(
'relev');
151 $this->tpl->setVariable(
'REL_PBAR', $pbar->render());
152 $this->tpl->parseCurrentBlock();
156 $this->tpl->setVariable(
"ITEM_HTML",
$html);
161 $this->tpl->setCurrentBlock(
'creation');
163 $this->tpl->parseCurrentBlock();
169 if (!$objDefinition->isPlugin(
$type)) {
170 $type_txt =
$lng->txt(
'icon') .
' ' .
$lng->txt(
'obj_' .
$type);
171 $icon = ilObject::_getIcon($obj_id,
'small',
$type);
173 include_once(
"./Services/Component/classes/class.ilPlugin.php");
175 $icon = ilObject::_getIcon($obj_id,
'small',
$type);
178 $this->tpl->setVariable(
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static lookupTxtById($plugin_id, $lang_var)
setEnableNumInfo($a_val)
Set enable num info.
getSelectableColumns()
Get selectable columns.
TableGUI class for search results.
enabledRelevance()
Check if relevance is visible.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getInstance()
Factory.
static _lookupCreationDate($a_id)
Lookup creation date.
getSelectedColumns()
Get selected columns.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
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.
setEnableTitle($a_enabletitle)
Set Enable Title.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
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.