38 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
39 require_once
"./Modules/Category/classes/class.ilObjCategoryGUI.php";
47 function ilObjRootFolderGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
52 $this->
ilContainerGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
54 $lng->loadLanguageModule(
"cntr");
72 $this->ctrl->returnToParent($this);
95 global $rbacsystem,
$lng;
97 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
99 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
101 $tabs_gui->addTab(
'view_content', $lng->txt(
"content"),
102 $this->ctrl->getLinkTarget($this,
""));
105 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
107 $force_active = (
$_GET[
"cmd"] ==
"edit")
110 $tabs_gui->addTarget(
"settings",
111 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this)
112 ,
"", $force_active);
124 $next_class = $this->ctrl->getNextClass($this);
125 $cmd = $this->ctrl->getCmd();
129 case 'ilcontainerlinklistgui':
130 include_once(
"./classes/class.ilContainerLinkListGUI.php");
132 $ret =& $this->ctrl->forwardCommand($link_list_gui);
136 case "ilpageobjectgui":
141 $this->tpl->setContent(
$ret);
145 case 'ilpermissiongui':
147 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
149 $ret =& $this->ctrl->forwardCommand($perm_gui);
155 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
156 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
161 case 'ilobjectcopygui':
163 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
165 $cp->setType(
'root');
166 $this->ctrl->forwardCommand($cp);
169 case "ilobjstylesheetgui":
173 case "ilcommonactiondispatchergui":
174 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
176 $this->ctrl->forwardCommand($gui);
181 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
182 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
205 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
206 ilObjectListGUI::prepareJSLinks(
"",
207 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
208 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
210 $ilTabs->activateTab(
"view_content");
224 $this->tpl->setDescription(
"");
227 if ($this->object->getTitle() ==
"ILIAS")
229 $this->tpl->setTitle($lng->txt(
"repository"));
233 if ($this->object->getDescription() !=
"")
235 $this->tpl->setTitle($this->object->getDescription());
243 $this->tabs_gui->addSubTab(
"settings_misc",
244 $this->lng->txt(
"settings"),
245 $this->ctrl->getLinkTarget($this,
"edit"));
247 $this->tabs_gui->addSubTab(
"settings_trans",
248 $this->lng->txt(
"title_and_translations"),
249 $this->ctrl->getLinkTarget($this,
"editTranslations"));
251 $this->tabs_gui->activateTab(
"settings");
252 $this->tabs_gui->activateSubTab($active_tab);
259 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
261 $form->setFormAction($this->ctrl->getFormAction($this));
262 $form->setTitle($this->lng->txt(
"repository"));
267 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
271 $sort_title =
new ilRadioOption($this->lng->txt(
'sorting_title_header'),
273 $sort_title->
setInfo($this->lng->txt(
'sorting_info_title'));
274 $sort->addOption($sort_title);
276 $sort_manual =
new ilRadioOption($this->lng->txt(
'sorting_manual_header'),
278 $sort_manual->
setInfo($this->lng->txt(
'sorting_info_manual'));
279 $sort->addOption($sort_manual);
281 $sort->setValue($settings->getSortMode());
282 $form->addItem($sort);
288 $hide =
new ilCheckboxInputGUI($this->lng->txt(
"cntr_hide_title_and_icon"),
"hide_header_icon_and_title");
290 $form->addItem($hide);
293 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
294 $form->addCommandButton(
"addTranslation" , $this->lng->txt(
"add_translation"));
313 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
318 if($form->checkInput())
320 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
322 $settings->
setSortMode($form->getInput(
"sorting"));
326 if ($this->ilias->getSetting(
"custom_icons"))
328 if($form->getItemByPostVar(
"cont_big_icon")->getDeletionFlag())
330 $this->
object->removeBigIcon();
332 if($form->getItemByPostVar(
"cont_tiny_icon")->getDeletionFlag())
334 $this->
object->removeTinyIcon();
337 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
338 null, $_FILES[
"cont_tiny_icon"][
'tmp_name']);
343 "hide_header_icon_and_title",
344 $form->getInput(
"hide_header_icon_and_title"));
348 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
354 $this->ctrl->redirect($this,
"edit");
359 $form->setValuesByPost();
360 $this->tpl->setContent($form->getHTML());
371 $this->lng->loadLanguageModule($this->object->getType());
374 include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
377 if ($a_get_post_values)
380 foreach(
$_POST[
"title"] as $k => $v)
382 $vals[] = array(
"title" => $v,
383 "desc" =>
$_POST[
"desc"][$k],
384 "lang" =>
$_POST[
"lang"][$k],
385 "default" => (
$_POST[
"default"] == $k));
387 $table->setData($vals);
391 $data = $this->
object->getTranslations();
392 foreach(
$data[
"Fobject"] as $k => $v)
394 $data[
"Fobject"][$k][
"default"] = ($k ==
$data[
"default_language"]);
396 $table->setData(
$data[
"Fobject"]);
398 $tpl->setContent($table->getHTML());
408 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
412 if (!isset(
$_POST[
"default"]) && count(
$_POST[
"lang"]) > 0)
419 if (array_key_exists(
"",
$_POST[
"lang"]))
426 if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"]))
433 $this->
object->removeTranslations();
435 if(
sizeof(
$_POST[
"title"]))
437 foreach(
$_POST[
"title"] as $k => $v)
440 $is_default = (
$_POST[
"default"] == $k);
445 $this->
object->update();
448 $this->
object->addTranslation(
458 $this->
object->setTitle(
"ILIAS");
459 $this->
object->setDescription(
"");
460 $this->
object->update();
464 $this->ctrl->redirect($this,
"editTranslations");
472 if(
sizeof(
$_POST[
"title"]))
474 $k = max(array_keys(
$_POST[
"title"]))+1;
490 foreach(
$_POST[
"title"] as $k => $v)
494 unset(
$_POST[
"title"][$k]);
495 unset(
$_POST[
"desc"][$k]);
496 unset(
$_POST[
"lang"][$k]);
497 if(
$_POST[
"default"] == $k)
504 if($del_default &&
sizeof(
$_POST[
"title"]))
506 $_POST[
"default"] = array_shift(array_keys(
$_POST[
"title"]));
518 if ($ilAccess->checkAccess(
"read",
"",1))
520 $_GET[
"cmd"] =
"frameset";
522 include(
"repository.php");
525 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
535 $this->tpl->setVariable(
'TXT_SORTING',$this->lng->txt(
'sorting_header'));
536 $this->tpl->setVariable(
'TXT_SORT_TITLE',$this->lng->txt(
'sorting_title_header'));
537 $this->tpl->setVariable(
'INFO_SORT_TITLE',$this->lng->txt(
'sorting_info_title'));
538 $this->tpl->setVariable(
'TXT_SORT_MANUAL',$this->lng->txt(
'sorting_manual_header'));
539 $this->tpl->setVariable(
'INFO_SORT_MANUAL',$this->lng->txt(
'sorting_info_manual'));
541 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');