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();
72 $this->tpl->setTitleIcon(
76 $this->tpl->setTitle(
$lng->txt(
"search"));
88 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
90 $this->form->setOpenTag(
false);
91 $this->form->setCloseTag(
false);
96 $this->form->addItem($radg);
99 if ($a_mode == self::SEARCH_FORM_STANDARD) {
109 $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();
124 if ($details[
$type]) {
127 $cbgr->addOption($cb);
129 if ($a_mode == self::SEARCH_FORM_LUCENE) {
131 $mimes = $this->getMimeDetails();
137 $cbgr->addOption($op3);
142 $cbgr->setValue(array_merge((array) $details, (array) $mimes));
143 $op2->addSubItem($cbgr);
145 if ($a_mode != self::SEARCH_FORM_STANDARD && $det) {
146 $op2->setChecked(
true);
150 $radg->addOption($op2);
151 $this->form->addItem($radg);
153 $this->form->addItem($op2);
157 $this->form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
167 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
169 $form->setOpenTag(
false);
170 $form->setCloseTag(
false);
175 $form->addItem($radg);
178 include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
180 $ti->setSelectText(
$lng->txt(
"search_select_search_area"));
182 $ti->readFromSession();
186 if (isset(
$_POST[
"root_id"])) {
187 $ti->setValue(
$_POST[
"root_id"]);
188 $ti->writeToSession();
190 $form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
202 if (method_exists($this, $a_cmd)) {
215 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
217 $this->showSavedResults();
225 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
227 $this->showSavedResults();
233 public function delete()
235 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
245 $this->showSavedResults();
250 $this->showSavedResults();
258 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
260 $admin->performDelete();
268 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
278 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
285 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
292 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
294 $admin->showLinkIntoMultipleObjectsTree();
299 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
301 $admin->showMoveIntoObjectTree();
306 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
308 $admin->performPasteIntoMultipleObjects();
314 $this->ctrl->redirect($this);
320 $this->ctrl->redirect($this);
325 $_SESSION[
"il_cont_admin_panel"] =
false;
326 $this->ctrl->redirect($this);
334 $this->ctrl->redirect($this);
343 $ilLocator->addItem($this->lng->txt(
'search'), $this->ctrl->getLinkTarget($this));
344 $this->tpl->setLocator();
358 $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"], $this->search_cache->getResultPageNumber());
365 if ($this->search_cache->getResultPageNumber() > 1) {
366 $this->ctrl->setParameter($this,
'page_number', $this->search_cache->getResultPageNumber() - 1);
372 $this->prev_link = $this->ctrl->getLinkTarget($this,
'performSearch');
375 if (
$i == $this->search_cache->getResultPageNumber()) {
383 $this->ctrl->setParameter($this,
'page_number',
$i);
384 $link =
'<a href="' . $this->ctrl->getLinkTarget($this,
'performSearch') .
'" /a>' .
$i .
'</a> ';
393 $this->ctrl->setParameter($this,
'page_number', $this->search_cache->getResultPageNumber() + 1);
399 $this->next_link = $this->ctrl->getLinkTarget($this,
'performSearch');
407 $this->ctrl->clearParameters($this);
418 $path_arr = $tree->getPathFull($a_root_node, ROOT_FOLDER_ID);
420 foreach ($path_arr as
$data) {
425 $path .= $this->lng->txt(
'repository');
436 $q = $_REQUEST[
"term"];
437 include_once(
"./Services/Search/classes/class.ilSearchAutoComplete.php");
446 $options = $this->search_cache->getCreationFilter();
448 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
450 $form->setOpenTag(
false);
451 $form->setCloseTag(
false);
454 $enabled->setValue(1);
455 $enabled->setChecked((
bool)
$options[
'enabled']);
456 $form->addItem($enabled);
458 #$group = new ilRadioGroupInputGUI('', 'screation_type');
459 #$group->setValue((int) $options['type']);
460 #$group->addOption($opt1 = new ilRadioOption($this->lng->txt('search_filter_date'), 1));
463 $limit_sel->setValue(
$options[
'ontype']);
464 $limit_sel->setOptions(
466 1 => $this->lng->txt(
'search_created_after'),
467 2 => $this->lng->txt(
'search_created_before'),
468 3 => $this->lng->txt(
'search_created_on')
471 $enabled->addSubItem($limit_sel);
480 $ds->setRequired(
true);
482 $enabled->addSubItem($ds);
484 #$group->addOption($opt2 = new ilRadioOption($this->lng->txt('search_filter_duration'), 2));
486 #$duration = new ilDurationInputGUI($this->lng->txt('search_filter_duration'), 'screation_duration');
487 #$duration->setMonths((int) $options['duration']['MM']);
488 #$duration->setDays((int) $options['duration']['dd']);
489 #$duration->setShowMonths(true);
490 #$duration->setShowDays(true);
491 #$duration->setShowHours(false);
492 #$duration->setShowMinutes(false);
493 #$duration->setTitle($this->lng->txt('search_newer_than'));
494 #$opt2->addSubItem($duration);
496 #$enabled->addSubItem($group);
498 $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this,
'performSearch'));
509 return $this->search_cache;
518 if (!$this->
settings->isDateFilterEnabled()) {
525 if (
$form->checkInput()) {
530 $options[
'duration'] =
$form->getInput(
'screation_duration');
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
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.
keepObjectsInClipboardObject()
cancel action but keep objects in clipboardvoid
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(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list