4include_once
'Services/Search/classes/class.ilSearchSettings.php';
5include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
6include_once
'./Services/Administration/interfaces/interface.ilAdministrationCommandHandling.php';
52 $this->lng->loadLanguageModule(
'search');
54 $ilMainMenu->setActive(
'search');
60 global $ilLocator,
$lng;
62 $this->tpl->getStandardTemplate();
71 $this->tpl->setTitle(
$lng->txt(
"search"));
84 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
86 $this->form->setOpenTag(
false);
87 $this->form->setCloseTag(
false);
92 $this->form->addItem($radg);
96 if($a_mode == self::SEARCH_FORM_STANDARD)
107 $radg->addOption($op1);
112 $op2 =
new ilCheckboxInputGUI($this->lng->txt(
'search_filter_by_type'),
'item_filter_enabled');
119 $cbgr->setUseValuesAsKeys(
true);
120 $details = $this->getDetails();
129 $cbgr->addOption($cb);
131 if($a_mode == self::SEARCH_FORM_LUCENE)
135 $mimes = $this->getMimeDetails();
143 $cbgr->addOption($op3);
148 $cbgr->setValue(array_merge((array) $details,(array) $mimes));
149 $op2->addSubItem($cbgr);
151 if($a_mode != self::SEARCH_FORM_STANDARD && $det)
153 $op2->setChecked(
true);
158 $radg->addOption($op2);
159 $this->form->addItem($radg);
163 $this->form->addItem($op2);
167 $this->form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
177 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
179 $form->setOpenTag(
false);
180 $form->setCloseTag(
false);
185 $form->addItem($radg);
188 include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
190 $ti->setSelectText(
$lng->txt(
"search_select_search_area"));
192 $ti->readFromSession();
196 if (isset(
$_POST[
"root_id"]))
198 $ti->setValue(
$_POST[
"root_id"]);
199 $ti->writeToSession();
201 $form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
213 if(method_exists($this, $a_cmd))
229 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
231 $this->showSavedResults();
239 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
241 $this->showSavedResults();
247 public function delete()
249 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
259 $this->showSavedResults();
264 $this->showSavedResults();
272 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
274 $admin->performDelete();
284 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
294 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
301 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
308 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
310 $admin->showLinkIntoMultipleObjectsTree();
315 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
317 $admin->showMoveIntoObjectTree();
322 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
324 $admin->performPasteIntoMultipleObjects();
330 $this->ctrl->redirect($this);
336 $this->ctrl->redirect($this);
341 $_SESSION[
"il_cont_admin_panel"] =
false;
342 $this->ctrl->redirect($this);
351 $ilLocator->addItem($this->lng->txt(
'search'),$this->ctrl->getLinkTarget($this));
352 $this->tpl->setLocator();
366 $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"],$this->search_cache->getResultPageNumber());
374 if($this->search_cache->getResultPageNumber() > 1)
376 $this->ctrl->setParameter($this,
'page_number',$this->search_cache->getResultPageNumber() - 1);
382 $this->prev_link = $this->ctrl->getLinkTarget($this,
'performSearch');
384 for($i = 1;$i <=
$_SESSION[
"$a_session_key"];$i++)
386 if($i == $this->search_cache->getResultPageNumber())
395 $this->ctrl->setParameter($this,
'page_number',$i);
396 $link =
'<a href="'.$this->ctrl->getLinkTarget($this,
'performSearch').
'" /a>'.$i.
'</a> ';
406 $this->ctrl->setParameter($this,
'page_number',$this->search_cache->getResultPageNumber() + 1);
412$this->next_link = $this->ctrl->getLinkTarget($this,
'performSearch');
420 $this->ctrl->clearParameters($this);
431 $path_arr = $tree->getPathFull($a_root_node,ROOT_FOLDER_ID);
433 foreach($path_arr as
$data)
442 $path .= $this->lng->txt(
'repository');
455 include_once(
"./Services/Search/classes/class.ilSearchAutoComplete.php");
464 $options = $this->search_cache->getCreationFilter();
466 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
468 $form->setOpenTag(
false);
469 $form->setCloseTag(
false);
472 $enabled->setValue(1);
473 $enabled->setChecked((
bool)
$options[
'enabled']);
474 $form->addItem($enabled);
476 #$group = new ilRadioGroupInputGUI('', 'screation_type');
477 #$group->setValue((int) $options['type']);
478 #$group->addOption($opt1 = new ilRadioOption($this->lng->txt('search_filter_date'), 1));
481 $limit_sel->setValue(
$options[
'ontype']);
482 $limit_sel->setOptions(
484 1 => $this->lng->txt(
'search_created_after'),
485 2 => $this->lng->txt(
'search_created_before'),
486 3 => $this->lng->txt(
'search_created_on')
489 $enabled->addSubItem($limit_sel);
501 #$ds->setMode(ilDateTimeInputGUI::MODE_INPUT);
503 $enabled->addSubItem($ds);
505 #$group->addOption($opt2 = new ilRadioOption($this->lng->txt('search_filter_duration'), 2));
507 #$duration = new ilDurationInputGUI($this->lng->txt('search_filter_duration'), 'screation_duration');
508 #$duration->setMonths((int) $options['duration']['MM']);
509 #$duration->setDays((int) $options['duration']['dd']);
510 #$duration->setShowMonths(true);
511 #$duration->setShowDays(true);
512 #$duration->setShowHours(false);
513 #$duration->setShowMinutes(false);
514 #$duration->setTitle($this->lng->txt('search_newer_than'));
515 #$opt2->addSubItem($duration);
517 #$enabled->addSubItem($group);
519 $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this,
'performSearch'));
531 return $this->search_cache;
538 if($form->checkInput())
540 $options[
'enabled'] = $form->getInput(
'screation');
541 $options[
'type'] = $form->getInput(
'screation_type');
542 $options[
'ontype'] = $form->getInput(
'screation_ontype');
544 $options[
'duration'] = $form->getInput(
'screation_duration');
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.
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.
autoComplete()
Data resource for autoComplete.
performDelete()
Delete objects.
const SEARCH_FORM_STANDARD
ilSearchBaseGUI()
Constructor @access public.
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['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
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($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options