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 $ilMainMenu =
$DIC[
'ilMainMenu'];
61 $this->lng->loadLanguageModule(
'search');
63 $ilMainMenu->setActive(
'search');
71 $ilLocator =
$DIC[
'ilLocator'];
74 $this->tpl->getStandardTemplate();
81 $this->tpl->setTitleIcon(
82 ilObject::_getIcon(
"",
"big",
"src"),
85 $this->tpl->setTitle(
$lng->txt(
"search"));
100 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
102 $this->form->setOpenTag(
false);
103 $this->form->setCloseTag(
false);
108 $this->form->addItem($radg);
111 if ($a_mode == self::SEARCH_FORM_STANDARD) {
121 $radg->addOption($op1);
124 $op2 =
new ilCheckboxInputGUI($this->lng->txt(
'search_filter_by_type'),
'item_filter_enabled');
131 $cbgr->setUseValuesAsKeys(
true);
132 $details = $this->getDetails();
136 if ($details[
$type]) {
139 $cbgr->addOption($cb);
141 if ($a_mode == self::SEARCH_FORM_LUCENE) {
143 $mimes = $this->getMimeDetails();
149 $cbgr->addOption($op3);
154 $cbgr->setValue(array_merge((array) $details, (array) $mimes));
155 $op2->addSubItem($cbgr);
157 if ($a_mode != self::SEARCH_FORM_STANDARD && $det) {
158 $op2->setChecked(
true);
162 $radg->addOption($op2);
163 $this->form->addItem($radg);
165 $this->form->addItem($op2);
169 $this->form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
182 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
184 $form->setOpenTag(
false);
185 $form->setCloseTag(
false);
190 $form->addItem($radg);
193 include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
195 $ti->setSelectText(
$lng->txt(
"search_select_search_area"));
197 $ti->readFromSession();
201 if (isset(
$_POST[
"root_id"])) {
202 $ti->setValue(
$_POST[
"root_id"]);
203 $ti->writeToSession();
205 $form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
217 if (method_exists($this, $a_cmd)) {
230 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
232 $this->showSavedResults();
240 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
242 $this->showSavedResults();
248 public function delete()
250 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
260 $this->showSavedResults();
265 $this->showSavedResults();
273 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
275 $admin->performDelete();
283 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
293 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
300 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
307 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
309 $admin->showLinkIntoMultipleObjectsTree();
314 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
316 $admin->showPasteTree();
321 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
323 $admin->performPasteIntoMultipleObjects();
329 $this->ctrl->redirect($this);
335 $this->ctrl->redirect($this);
340 $_SESSION[
"il_cont_admin_panel"] =
false;
341 $this->ctrl->redirect($this);
349 $this->ctrl->redirect($this);
358 $ilLocator->addItem($this->lng->txt(
'search'), $this->ctrl->getLinkTarget($this));
359 $this->tpl->setLocator();
375 $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"], $this->search_cache->getResultPageNumber());
382 if ($this->search_cache->getResultPageNumber() > 1) {
383 $this->ctrl->setParameter($this,
'page_number', $this->search_cache->getResultPageNumber() - 1);
389 $this->prev_link = $this->ctrl->getLinkTarget($this,
'performSearch');
392 if (
$i == $this->search_cache->getResultPageNumber()) {
400 $this->ctrl->setParameter($this,
'page_number',
$i);
401 $link =
'<a href="' . $this->ctrl->getLinkTarget($this,
'performSearch') .
'" /a>' .
$i .
'</a> ';
410 $this->ctrl->setParameter($this,
'page_number', $this->search_cache->getResultPageNumber() + 1);
416 $this->next_link = $this->ctrl->getLinkTarget($this,
'performSearch');
424 $this->ctrl->clearParameters($this);
437 $path_arr =
$tree->getPathFull($a_root_node, ROOT_FOLDER_ID);
439 foreach ($path_arr as
$data) {
444 $path .= $this->lng->txt(
'repository');
455 $q = $_REQUEST[
"term"];
456 include_once(
"./Services/Search/classes/class.ilSearchAutoComplete.php");
465 $options = $this->search_cache->getCreationFilter();
467 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
469 $form->setOpenTag(
false);
470 $form->setCloseTag(
false);
473 $enabled->setValue(1);
474 $enabled->setChecked((
bool)
$options[
'enabled']);
475 $form->addItem($enabled);
477 #$group = new ilRadioGroupInputGUI('', 'screation_type');
478 #$group->setValue((int) $options['type']);
479 #$group->addOption($opt1 = new ilRadioOption($this->lng->txt('search_filter_date'), 1));
482 $limit_sel->setValue(
$options[
'ontype']);
483 $limit_sel->setOptions(
485 1 => $this->lng->txt(
'search_created_after'),
486 2 => $this->lng->txt(
'search_created_before'),
487 3 => $this->lng->txt(
'search_created_on')
490 $enabled->addSubItem($limit_sel);
499 $ds->setRequired(
true);
501 $enabled->addSubItem($ds);
503 #$group->addOption($opt2 = new ilRadioOption($this->lng->txt('search_filter_duration'), 2));
505 #$duration = new ilDurationInputGUI($this->lng->txt('search_filter_duration'), 'screation_duration');
506 #$duration->setMonths((int) $options['duration']['MM']);
507 #$duration->setDays((int) $options['duration']['dd']);
508 #$duration->setShowMonths(true);
509 #$duration->setShowDays(true);
510 #$duration->setShowHours(false);
511 #$duration->setShowMinutes(false);
512 #$duration->setTitle($this->lng->txt('search_newer_than'));
513 #$opt2->addSubItem($duration);
515 #$enabled->addSubItem($group);
517 $form->setFormAction(
$GLOBALS[
'DIC'][
'ilCtrl']->getFormAction($this,
'performSearch'));
528 return $this->search_cache;
537 if (!$this->
settings->isDateFilterEnabled()) {
544 if (
$form->checkInput()) {
549 $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.
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.
showPasteTree()
Target selection cut.
getSearchAreaForm()
Init standard search form.
cut()
Interface ilAdministrationCommandHandler.
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)
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.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
redirection script todo: (a better solution should control the processing via a xml file)
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list