25 include_once
'./Services/Search/classes/class.ilSearchSettings.php';
61 $this->cmdClass = $a_cmd_class;
76 $_SESSION[
'lucene_search'][
'details'][$a_obj_id] =
true;
88 $_SESSION[
'lucene_search'][
'details'] = array();
101 return isset(
$_SESSION[
'lucene_search'][
'details'][$a_obj_id]) and
$_SESSION[
'lucene_search'][
'details'][$a_obj_id];
121 $this->highlighter = $a_highlighter;
168 if($a_limited and !self::enabledDetails($this->
getObjId()))
170 return array_slice($this->subitem_ids,0,self::$MAX_SUBITEMS);
192 $this->tpl =
new ilTemplate(
'tpl.subitem_list.html',
true,
true,
'Services/Object');
194 $this->ref_id = $a_ref_id;
198 $this->subitem_ids = $a_subitem_ids;
213 if(self::enabledDetails($this->
getObjId()))
220 $ilCtrl->setParameterByClass(get_class($this->
getCmdClass()),
'details', (
int) $this->
getObjId());
221 $link = $ilCtrl->getLinkTargetByClass(get_class($this->
getCmdClass()),
'');
222 $ilCtrl->clearParametersByClass(get_class($this->
getCmdClass()));
224 $this->tpl->setCurrentBlock(
'choose_details');
225 $this->tpl->setVariable(
'LUC_DETAILS_LINK',$link);
226 $this->tpl->setVariable(
'LUC_NUM_HITS',sprintf($lng->txt(
'lucene_more_hits_link'),
$additional));
227 $this->tpl->parseCurrentBlock();
240 $this->tpl->addBlockFile(
'SUB_REL',
'sub_rel',
'tpl.lucene_sub_relevance.html',
'Services/Search');
244 $width1 = (int) ((
int) $relevance / 2);
245 $width2 = (int) ((50 - $width1));
247 $this->tpl->setCurrentBlock(
'relev');
248 $this->tpl->setVariable(
'VAL_REL',sprintf(
"%d %%",$relevance));
249 $this->tpl->setVariable(
'WIDTH_A',$width1);
250 $this->tpl->setVariable(
'WIDTH_B',$width2);
253 $this->tpl->parseCurrentBlock();
257 abstract public function getHTML();
__construct($a_cmd_class)
Constructor.
getHighlighter()
get highlighter
Base class for all sub item list gui's.
static resetDetails()
reset details As long as static::resetDetails is not possible this method is final ...
showDetailsLink()
show details link
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
getCmdClass()
get cmd class
special template class to simplify handling of ITX/PEAR
setHighlighter($a_highlighter)
set highlighter
static setShowDetails($a_obj_id)
set show details.
static _lookupType($a_id, $a_reference=false)
lookup object type
static enabledDetails($a_obj_id)
enabled show details As long as static::enableDetails is not possible this method is final ...
init($item_list_gui, $a_ref_id, $a_subitem_ids)
init
parseRelevance($sub_item)
getItemListGUI()
get item list gui
getSubItemIds($a_limited=false)
get sub item ids