4include_once
'Services/Search/classes/class.ilSearchSettings.php';
5include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
6include_once
'./Services/Administration/interfaces/interface.ilAdministrationCommandHandling.php';
55 $this->lng->loadLanguageModule(
'search');
57 $ilMainMenu->setActive(
'search');
63 global $ilLocator,
$lng;
65 $this->tpl->getStandardTemplate();
74 $this->tpl->setTitle(
$lng->txt(
"search"));
87 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
89 $this->form->setOpenTag(
false);
90 $this->form->setCloseTag(
false);
95 $this->form->addItem($radg);
99 if($a_mode == self::SEARCH_FORM_STANDARD)
110 $radg->addOption($op1);
115 $op2 =
new ilCheckboxInputGUI($this->lng->txt(
'search_filter_by_type'),
'item_filter_enabled');
122 $cbgr->setUseValuesAsKeys(
true);
123 $details = $this->getDetails();
132 $cbgr->addOption($cb);
134 if($a_mode == self::SEARCH_FORM_LUCENE)
138 $mimes = $this->getMimeDetails();
146 $cbgr->addOption($op3);
151 $cbgr->setValue(array_merge((array) $details,(array) $mimes));
152 $op2->addSubItem($cbgr);
154 if($a_mode != self::SEARCH_FORM_STANDARD && $det)
156 $op2->setChecked(
true);
161 $radg->addOption($op2);
162 $this->form->addItem($radg);
166 $this->form->addItem($op2);
170 $this->form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
180 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
182 $form->setOpenTag(
false);
183 $form->setCloseTag(
false);
188 $form->addItem($radg);
191 include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
193 $ti->setSelectText(
$lng->txt(
"search_select_search_area"));
195 $ti->readFromSession();
199 if (isset(
$_POST[
"root_id"]))
201 $ti->setValue(
$_POST[
"root_id"]);
202 $ti->writeToSession();
204 $form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
216 if(method_exists($this, $a_cmd))
232 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
234 $this->showSavedResults();
242 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
244 $this->showSavedResults();
250 public function delete()
252 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
262 $this->showSavedResults();
267 $this->showSavedResults();
275 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
277 $admin->performDelete();
287 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
297 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
304 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
311 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
313 $admin->showLinkIntoMultipleObjectsTree();
318 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
320 $admin->showMoveIntoObjectTree();
325 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
327 $admin->performPasteIntoMultipleObjects();
333 $this->ctrl->redirect($this);
339 $this->ctrl->redirect($this);
344 $_SESSION[
"il_cont_admin_panel"] =
false;
345 $this->ctrl->redirect($this);
354 $ilLocator->addItem($this->lng->txt(
'search'),$this->ctrl->getLinkTarget($this));
355 $this->tpl->setLocator();
369 $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"],$this->search_cache->getResultPageNumber());
377 if($this->search_cache->getResultPageNumber() > 1)
379 $this->ctrl->setParameter($this,
'page_number',$this->search_cache->getResultPageNumber() - 1);
385 $this->prev_link = $this->ctrl->getLinkTarget($this,
'performSearch');
387 for($i = 1;$i <=
$_SESSION[
"$a_session_key"];$i++)
389 if($i == $this->search_cache->getResultPageNumber())
398 $this->ctrl->setParameter($this,
'page_number',$i);
399 $link =
'<a href="'.$this->ctrl->getLinkTarget($this,
'performSearch').
'" /a>'.$i.
'</a> ';
409 $this->ctrl->setParameter($this,
'page_number',$this->search_cache->getResultPageNumber() + 1);
415$this->next_link = $this->ctrl->getLinkTarget($this,
'performSearch');
423 $this->ctrl->clearParameters($this);
434 $path_arr = $tree->getPathFull($a_root_node,ROOT_FOLDER_ID);
436 foreach($path_arr as
$data)
445 $path .= $this->lng->txt(
'repository');
457 $q = $_REQUEST[
"term"];
458 include_once(
"./Services/Search/classes/class.ilSearchAutoComplete.php");
467 $options = $this->search_cache->getCreationFilter();
469 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
471 $form->setOpenTag(
false);
472 $form->setCloseTag(
false);
475 $enabled->setValue(1);
476 $enabled->setChecked((
bool)
$options[
'enabled']);
477 $form->addItem($enabled);
479 #$group = new ilRadioGroupInputGUI('', 'screation_type');
480 #$group->setValue((int) $options['type']);
481 #$group->addOption($opt1 = new ilRadioOption($this->lng->txt('search_filter_date'), 1));
484 $limit_sel->setValue(
$options[
'ontype']);
485 $limit_sel->setOptions(
487 1 => $this->lng->txt(
'search_created_after'),
488 2 => $this->lng->txt(
'search_created_before'),
489 3 => $this->lng->txt(
'search_created_on')
492 $enabled->addSubItem($limit_sel);
504 $ds->setRequired(
true);
506 $enabled->addSubItem($ds);
508 #$group->addOption($opt2 = new ilRadioOption($this->lng->txt('search_filter_duration'), 2));
510 #$duration = new ilDurationInputGUI($this->lng->txt('search_filter_duration'), 'screation_duration');
511 #$duration->setMonths((int) $options['duration']['MM']);
512 #$duration->setDays((int) $options['duration']['dd']);
513 #$duration->setShowMonths(true);
514 #$duration->setShowDays(true);
515 #$duration->setShowHours(false);
516 #$duration->setShowMinutes(false);
517 #$duration->setTitle($this->lng->txt('search_newer_than'));
518 #$opt2->addSubItem($duration);
520 #$enabled->addSubItem($group);
522 $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this,
'performSearch'));
534 return $this->search_cache;
543 if(!$this->
settings->isDateFilterEnabled())
551 if($form->checkInput())
553 $options[
'enabled'] = $form->getInput(
'screation');
554 $options[
'type'] = $form->getInput(
'screation_type');
555 $options[
'ontype'] = $form->getInput(
'screation_ontype');
557 $options[
'duration'] = $form->getInput(
'screation_duration');
An exception for terminatinating execution or to throw for unit testing.
Handles Administration commands (cut, delete paste)
This class represents an option in a checkbox group.
static addToDesktop()
Add desktop item @access public.
static removeFromDesktop()
Remove item from personal desktop @access public.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
This class represents an option in a radio group.
static getList($a_str)
Get completion list.
__construct()
Constructor @access public.
initStandardSearchForm($a_mode)
Init standard search form.
disableAdministrationPanel()
Disable administration panel.
enableAdministrationPanel()
Enable administration panel.
addPager($result, $a_session_key)
Add Pager.
getSearchCache()
Get user search cache.
getSearchAreaForm()
Init standard search form.
cut()
Interface ilAdministrationCommandHandler.
showMoveIntoObjectTree()
Target selection cut.
performPasteIntoMultipleObjects()
Perform paste into multiple objects.
link()
Interface ilAdministrationCommandHandler.
cancelMoveLinkObject()
Cancel move/link.
showLinkIntoMultipleObjectsTree()
Target selection link.
loadCreationFilter()
Load creation date filter.
autoComplete()
Data resource for autoComplete.
performDelete()
Delete objects.
const SEARCH_FORM_STANDARD
addToDeskObject()
Interface methods.
cancelDelete()
Cancel delete.
removeFromDeskObject()
Remove from dektop
buildSearchAreaPath($a_root_node)
Build path for search area.
handleCommand($a_cmd)
Handle command.
static infoPanel($a_keep=true)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options