4 include_once
'Services/Search/classes/class.ilSearchSettings.php';
5 include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
6 include_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);
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");
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)
441 $path .= $data[
'title'];
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);
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');
This class represents an option in a radio group.
link()
Interface ilAdministrationCommandHandler.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
loadCreationFilter()
Load creation date filter.
cancelMoveLinkObject()
Cancel move/link.
removeFromDeskObject()
Remove from dektop.
getSearchAreaForm()
Init standard search form.
This class represents an option in a checkbox group.
showLinkIntoMultipleObjectsTree()
Target selection link.
Handles Administration commands (cut, delete paste)
performDelete()
Delete objects.
addToDeskObject()
Interface methods.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getList($a_str)
Get completion list.
static addToDesktop()
Add desktop item public.
buildSearchAreaPath($a_root_node)
Build path for search area.
disableAdministrationPanel()
Disable administration panel.
setValue($a_value)
Set Value.
addPager($result, $a_session_key)
Add Pager.
if(!is_array($argv)) $options
cut()
Interface ilAdministrationCommandHandler.
autoComplete()
Data resource for autoComplete.
__construct()
Constructor public.
initStandardSearchForm($a_mode)
Init standard search form.
static infoPanel($a_keep=true)
cancelDelete()
Cancel delete.
redirection script todo: (a better solution should control the processing via a xml file) ...
performPasteIntoMultipleObjects()
Perform paste into multiple objects.
handleCommand($a_cmd)
Handle command.
Create styles array
The data for the language used.
showMoveIntoObjectTree()
Target selection cut.
static removeFromDesktop()
Remove item from personal desktop public.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
enableAdministrationPanel()
Enable administration panel.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
const SEARCH_FORM_STANDARD
getSearchCache()
Get user search cache.