4include_once
'Services/Search/classes/class.ilSearchSettings.php';
5include_once
'./Services/Administration/interfaces/interface.ilAdministrationCommandHandling.php';
64 $ilMainMenu =
$DIC[
'ilMainMenu'];
70 $this->lng->loadLanguageModule(
'search');
72 $ilMainMenu->setActive(
'search');
75 $this->
user = $DIC->user();
82 $ilLocator =
$DIC[
'ilLocator'];
85 $this->tpl->loadStandardTemplate();
92 $this->tpl->setTitleIcon(
93 ilObject::_getIcon(
"",
"big",
"src"),
96 $this->tpl->setTitle(
$lng->txt(
"search"));
111 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
113 $this->form->setOpenTag(
false);
114 $this->form->setCloseTag(
false);
119 $this->form->addItem($radg);
122 if ($a_mode == self::SEARCH_FORM_STANDARD) {
132 $radg->addOption($op1);
135 $op2 =
new ilCheckboxInputGUI($this->lng->txt(
'search_filter_by_type'),
'item_filter_enabled');
142 $cbgr->setUseValuesAsKeys(
true);
143 $details = $this->getDetails();
147 if ($details[
$type]) {
150 $cbgr->addOption($cb);
152 if ($a_mode == self::SEARCH_FORM_LUCENE) {
154 $mimes = $this->getMimeDetails();
160 $cbgr->addOption($op3);
165 $cbgr->setValue(array_merge((array) $details, (array) $mimes));
166 $op2->addSubItem($cbgr);
168 if ($a_mode != self::SEARCH_FORM_STANDARD && $det) {
169 $op2->setChecked(
true);
173 $radg->addOption($op2);
174 $this->form->addItem($radg);
176 $this->form->addItem($op2);
180 $this->form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
193 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
195 $form->setOpenTag(
false);
196 $form->setCloseTag(
false);
201 $form->addItem($radg);
204 include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
206 $ti->setSelectText(
$lng->txt(
"search_select_search_area"));
208 $ti->readFromSession();
212 if (isset(
$_POST[
"root_id"])) {
213 $ti->setValue(
$_POST[
"root_id"]);
214 $ti->writeToSession();
216 $form->setFormAction(
$ilCtrl->getFormAction($this,
'performSearch'));
228 if (method_exists($this, $a_cmd)) {
241 $this->favourites->add($this->
user->getId(), (
int)
$_GET[
"item_ref_id"]);
242 $this->showSavedResults();
250 $this->favourites->remove($this->
user->getId(), (
int)
$_GET[
"item_ref_id"]);
251 $this->showSavedResults();
257 public function delete()
268 $this->showSavedResults();
273 $this->showSavedResults();
281 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
283 $admin->performDelete();
291 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';
315 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
317 $admin->showLinkIntoMultipleObjectsTree();
322 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
324 $admin->showPasteTree();
329 include_once
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
331 $admin->performPasteIntoMultipleObjects();
337 $this->ctrl->redirect($this);
343 $this->ctrl->redirect($this);
348 $_SESSION[
"il_cont_admin_panel"] =
false;
349 $this->ctrl->redirect($this);
357 $this->ctrl->redirect($this);
366 $ilLocator->addItem($this->lng->txt(
'search'), $this->ctrl->getLinkTarget($this));
367 $this->tpl->setLocator();
383 $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"], $this->search_cache->getResultPageNumber());
390 if ($this->search_cache->getResultPageNumber() > 1) {
391 $this->ctrl->setParameter($this,
'page_number', $this->search_cache->getResultPageNumber() - 1);
397 $this->prev_link = $this->ctrl->getLinkTarget($this,
'performSearch');
400 if (
$i == $this->search_cache->getResultPageNumber()) {
408 $this->ctrl->setParameter($this,
'page_number',
$i);
409 $link =
'<a href="' . $this->ctrl->getLinkTarget($this,
'performSearch') .
'" /a>' .
$i .
'</a> ';
418 $this->ctrl->setParameter($this,
'page_number', $this->search_cache->getResultPageNumber() + 1);
424 $this->next_link = $this->ctrl->getLinkTarget($this,
'performSearch');
432 $this->ctrl->clearParameters($this);
443 $tree =
$DIC[
'tree'];
445 $path_arr = $tree->getPathFull($a_root_node, ROOT_FOLDER_ID);
447 foreach ($path_arr as
$data) {
450 $path .=
$data[
'title'];
452 $path .= $this->lng->txt(
'repository');
463 $q = $_REQUEST[
"term"];
464 include_once(
"./Services/Search/classes/class.ilSearchAutoComplete.php");
473 $options = $this->search_cache->getCreationFilter();
475 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
477 $form->setOpenTag(
false);
478 $form->setCloseTag(
false);
481 $enabled->setValue(1);
482 $enabled->setChecked((
bool) $options[
'enabled']);
483 $form->addItem($enabled);
485 #$group = new ilRadioGroupInputGUI('', 'screation_type');
486 #$group->setValue((int) $options['type']);
487 #$group->addOption($opt1 = new ilRadioOption($this->lng->txt('search_filter_date'), 1));
490 $limit_sel->setValue($options[
'ontype']);
491 $limit_sel->setOptions(
493 1 => $this->lng->txt(
'search_created_after'),
494 2 => $this->lng->txt(
'search_created_before'),
495 3 => $this->lng->txt(
'search_created_on')
498 $enabled->addSubItem($limit_sel);
501 if ($options[
'date']) {
507 $ds->setRequired(
true);
509 $enabled->addSubItem($ds);
511 #$group->addOption($opt2 = new ilRadioOption($this->lng->txt('search_filter_duration'), 2));
513 #$duration = new ilDurationInputGUI($this->lng->txt('search_filter_duration'), 'screation_duration');
514 #$duration->setMonths((int) $options['duration']['MM']);
515 #$duration->setDays((int) $options['duration']['dd']);
516 #$duration->setShowMonths(true);
517 #$duration->setShowDays(true);
518 #$duration->setShowHours(false);
519 #$duration->setShowMinutes(false);
520 #$duration->setTitle($this->lng->txt('search_newer_than'));
521 #$opt2->addSubItem($duration);
523 #$enabled->addSubItem($group);
525 $form->setFormAction(
$GLOBALS[
'DIC'][
'ilCtrl']->getFormAction($this,
'performSearch'));
536 return $this->search_cache;
545 if (!$this->
settings->isDateFilterEnabled()) {
552 if ($form->checkInput()) {
553 $options[
'enabled'] = $form->getInput(
'screation');
554 $options[
'type'] = $form->getInput(
'screation_type');
555 $options[
'ontype'] = $form->getInput(
'screation_ontype');
556 $options[
'date'] = $form->getItemByPostVar(
'screation_date')->getDate()->get(
IL_CAL_UNIX);
557 $options[
'duration'] = $form->getInput(
'screation_duration');
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
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.
Manages favourites, currently the interface for other components, needs discussion.
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.
redirection script todo: (a better solution should control the processing via a xml file)