19 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
20 require_once
"./Modules/Category/classes/class.ilObjCategoryGUI.php";
28 function ilObjRootFolderGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
33 $this->
ilContainerGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
35 $lng->loadLanguageModule(
"cntr");
53 $this->ctrl->returnToParent($this);
76 global $rbacsystem,
$lng, $ilHelp;
78 $ilHelp->setScreenIdComponent(
"root");
80 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
82 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
84 $tabs_gui->addTab(
'view_content', $lng->txt(
"content"),
85 $this->ctrl->getLinkTarget($this,
""));
88 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
90 $force_active = (
$_GET[
"cmd"] ==
"edit")
93 $tabs_gui->addTarget(
"settings",
94 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this)
107 $next_class = $this->ctrl->getNextClass($this);
108 $cmd = $this->ctrl->getCmd();
112 case 'ilcontainerlinklistgui':
113 include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
115 $ret =& $this->ctrl->forwardCommand($link_list_gui);
119 case "ilpageobjectgui":
124 $this->tpl->setContent(
$ret);
128 case 'ilpermissiongui':
130 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
132 $ret =& $this->ctrl->forwardCommand($perm_gui);
138 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
139 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
144 case 'ilobjectcopygui':
146 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
148 $cp->setType(
'root');
149 $this->ctrl->forwardCommand($cp);
152 case "ilobjstylesheetgui":
156 case "ilcommonactiondispatchergui":
157 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
159 $this->ctrl->forwardCommand($gui);
165 if (
$cmd ==
"infoScreen")
174 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
175 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
198 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
199 ilObjectListGUI::prepareJSLinks(
"",
200 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
201 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
203 $ilTabs->activateTab(
"view_content");
217 $this->tpl->setDescription(
"");
220 if ($this->object->getTitle() ==
"ILIAS")
222 $this->tpl->setTitle($lng->txt(
"repository"));
226 if ($this->object->getDescription() !=
"")
228 $this->tpl->setDescription($this->object->getDescription());
236 $this->tabs_gui->addSubTab(
"settings_misc",
237 $this->lng->txt(
"settings"),
238 $this->ctrl->getLinkTarget($this,
"edit"));
240 $this->tabs_gui->addSubTab(
"settings_trans",
241 $this->lng->txt(
"title_and_translations"),
242 $this->ctrl->getLinkTarget($this,
"editTranslations"));
244 $this->tabs_gui->activateTab(
"settings");
245 $this->tabs_gui->activateSubTab($active_tab);
252 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
254 $form->setFormAction($this->ctrl->getFormAction($this));
255 $form->setTitle($this->lng->txt(
"repository"));
260 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
264 $sort_title =
new ilRadioOption($this->lng->txt(
'sorting_title_header'),
266 $sort_title->
setInfo($this->lng->txt(
'sorting_info_title'));
267 $sort->addOption($sort_title);
269 $sort_manual =
new ilRadioOption($this->lng->txt(
'sorting_manual_header'),
271 $sort_manual->
setInfo($this->lng->txt(
'sorting_info_manual'));
272 $sort->addOption($sort_manual);
274 $sort->setValue($settings->getSortMode());
275 $form->addItem($sort);
281 $hide =
new ilCheckboxInputGUI($this->lng->txt(
"cntr_hide_title_and_icon"),
"hide_header_icon_and_title");
283 $form->addItem($hide);
286 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
287 $form->addCommandButton(
"addTranslation", $this->lng->txt(
"add_translation"));
306 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
311 if($form->checkInput())
313 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
315 $settings->
setSortMode($form->getInput(
"sorting"));
319 if ($this->ilias->getSetting(
"custom_icons"))
321 if($form->getItemByPostVar(
"cont_big_icon")->getDeletionFlag())
323 $this->
object->removeBigIcon();
325 if($form->getItemByPostVar(
"cont_tiny_icon")->getDeletionFlag())
327 $this->
object->removeTinyIcon();
330 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
331 null, $_FILES[
"cont_tiny_icon"][
'tmp_name']);
336 "hide_header_icon_and_title",
337 $form->getInput(
"hide_header_icon_and_title"));
341 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
347 $this->ctrl->redirect($this,
"edit");
352 $form->setValuesByPost();
353 $this->tpl->setContent($form->getHTML());
364 $this->lng->loadLanguageModule($this->object->getType());
367 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
370 if ($a_get_post_values)
373 foreach(
$_POST[
"title"] as $k => $v)
375 $vals[] = array(
"title" => $v,
376 "desc" =>
$_POST[
"desc"][$k],
377 "lang" =>
$_POST[
"lang"][$k],
378 "default" => (
$_POST[
"default"] == $k));
380 $table->setData($vals);
384 $data = $this->
object->getTranslations();
385 foreach(
$data[
"Fobject"] as $k => $v)
387 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
389 $table->setData(
$data[
"Fobject"]);
391 $tpl->setContent($table->getHTML());
401 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
405 if (!isset(
$_POST[
"default"]) && count(
$_POST[
"lang"]) > 0)
412 if (array_key_exists(
"",
$_POST[
"lang"]))
419 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"]))
426 $this->
object->removeTranslations();
428 if(
sizeof(
$_POST[
"title"]))
430 foreach(
$_POST[
"title"] as $k => $v)
433 $is_default = (
$_POST[
"default"] == $k);
438 $this->
object->update();
441 $this->
object->addTranslation(
451 $this->
object->setTitle(
"ILIAS");
452 $this->
object->setDescription(
"");
453 $this->
object->update();
457 $this->ctrl->redirect($this,
"editTranslations");
465 if(
sizeof(
$_POST[
"title"]))
467 $k = max(array_keys(
$_POST[
"title"]))+1;
483 foreach(
$_POST[
"title"] as $k => $v)
487 unset(
$_POST[
"title"][$k]);
488 unset(
$_POST[
"desc"][$k]);
489 unset(
$_POST[
"lang"][$k]);
490 if(
$_POST[
"default"] == $k)
497 if($del_default &&
sizeof(
$_POST[
"title"]))
499 $_POST[
"default"] = array_shift(array_keys(
$_POST[
"title"]));
521 $this->tpl->setVariable(
'TXT_SORTING',$this->lng->txt(
'sorting_header'));
522 $this->tpl->setVariable(
'TXT_SORT_TITLE',$this->lng->txt(
'sorting_title_header'));
523 $this->tpl->setVariable(
'INFO_SORT_TITLE',$this->lng->txt(
'sorting_info_title'));
524 $this->tpl->setVariable(
'TXT_SORT_MANUAL',$this->lng->txt(
'sorting_manual_header'));
525 $this->tpl->setVariable(
'INFO_SORT_MANUAL',$this->lng->txt(
'sorting_info_manual'));
527 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');