3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
17 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
19 parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
22 $this->lng->loadLanguageModule(
'rep');
23 $this->lng->loadLanguageModule(
'cmps');
30 $next_class = $this->ctrl->getNextClass($this);
31 $cmd = $this->ctrl->getCmd();
35 if(!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId()))
37 $ilErr->raiseError($this->lng->txt(
'no_permission'), $ilErr->WARNING);
42 case 'ilpermissiongui':
43 $this->tabs_gui->setTabActive(
'perm_settings');
44 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
46 $this->ctrl->forwardCommand($perm_gui);
60 $this->tabs_gui->addTab(
"settings",
61 $this->lng->txt(
"settings"),
62 $this->ctrl->getLinkTarget($this,
"view"));
64 $this->tabs_gui->addTab(
"icons",
65 $this->lng->txt(
"rep_custom_icons"),
66 $this->ctrl->getLinkTarget($this,
"customIcons"));
68 $this->tabs_gui->addTab(
"modules",
69 $this->lng->txt(
"cmps_repository_object_types"),
70 $this->ctrl->getLinkTarget($this,
"listModules"));
72 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
74 $this->tabs_gui->addTab(
"perm_settings",
75 $this->lng->txt(
"perm_settings"),
76 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"));
82 $this->tabs_gui->activateTab(
"settings");
89 $this->tpl->setContent($a_form->getHTML());
96 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
98 $form->setTitle($this->lng->txt(
"settings"));
99 $form->setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
103 "flat" => $this->lng->txt(
"flatview"),
104 "tree" => $this->lng->txt(
"treeview")
108 $si->setInfo($this->lng->txt(
""));
109 if ($ilSetting->get(
"default_repository_view") ==
"tree")
111 $si->setValue(
"tree");
115 $si->setValue(
"flat");
121 "" => $this->lng->txt(
"adm_rep_tree_only_container"),
122 "tree" => $this->lng->txt(
"adm_all_resource_types")
127 $radg->
setValue($ilSetting->get(
"repository_tree_pres"));
128 $op1 =
new ilRadioOption($this->lng->txt(
"adm_rep_tree_only_cntr"),
"",
129 $this->lng->txt(
"adm_rep_tree_only_cntr_info"));
130 $radg->addOption($op1);
132 $op2 =
new ilRadioOption($this->lng->txt(
"adm_rep_tree_all_types"),
"all_types",
133 $this->lng->txt(
"adm_rep_tree_all_types_info"));
136 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_tree_limit_grp_crs"),
"rep_tree_limit_grp_crs");
137 $cb->setChecked($ilSetting->get(
"rep_tree_limit_grp_crs"));
138 $cb->
setInfo($this->lng->txt(
"adm_rep_tree_limit_grp_crs_info"));
139 $op2->addSubItem($cb);
141 $radg->addOption($op2);
143 $form->addItem($radg);
172 $cb->
setInfo($this->lng->txt(
"enable_trash_info"));
173 if ($ilSetting->get(
"enable_trash"))
175 $cb->setChecked(
true);
180 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
181 $this->lng->loadLanguageModule(
"trac");
182 $event =
new ilCheckboxInputGUI($this->lng->txt(
'trac_repository_changes'),
'change_event_tracking');
184 $form->addItem($event);
187 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
198 $lists->setTitle($this->lng->txt(
"rep_object_lists"));
199 $form->addItem($lists);
201 $sdesc =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_shorten_description"),
"rep_shorten_description");
202 $sdesc->
setInfo($this->lng->txt(
"adm_rep_shorten_description_info"));
203 $sdesc->setChecked($ilSetting->get(
"rep_shorten_description"));
204 $form->addItem($sdesc);
206 $sdesclen =
new ilNumberInputGUI($this->lng->txt(
"adm_rep_shorten_description_length"),
"rep_shorten_description_length");
207 $sdesclen->
setValue($ilSetting->get(
"rep_shorten_description_length"));
208 $sdesclen->setSize(3);
209 $sdesc->addSubItem($sdesclen);
212 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_item_cmd_asynch"),
"item_cmd_asynch");
213 $cb->
setInfo($this->lng->txt(
"adm_item_cmd_asynch_info"));
214 $cb->setChecked($ilSetting->get(
"item_cmd_asynch"));
218 $pl =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists'),
'comments_tagging_in_lists');
220 $pl->setChecked($ilSetting->get(
'comments_tagging_in_lists'));
223 $pltags =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists_tags'),
'comments_tagging_in_lists_tags');
225 $pltags->setChecked($ilSetting->get(
'comments_tagging_in_lists_tags'));
226 $pl->addSubItem($pltags);
229 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
239 if ($form->checkInput())
241 $ilSetting->set(
"default_repository_view",
$_POST[
"default_rep_view"]);
243 $ilSetting->set(
"repository_tree_pres",
$_POST[
"tree_pres"]);
244 if (
$_POST[
"tree_pres"] ==
"")
246 $_POST[
"rep_tree_limit_grp_crs"] =
"";
248 if (
$_POST[
"rep_tree_limit_grp_crs"] && !$ilSetting->get(
"rep_tree_limit_grp_crs"))
250 $_POST[
"rep_tree_synchronize"] =
true;
252 else if (!
$_POST[
"rep_tree_synchronize"] && $ilSetting->get(
"rep_tree_synchronize"))
254 $_POST[
"rep_tree_limit_grp_crs"] =
false;
256 $ilSetting->set(
"rep_tree_limit_grp_crs",
$_POST[
"rep_tree_limit_grp_crs"]);
261 $ilSetting->set(
"enable_trash",
$_POST[
"enable_trash"]);
263 $ilSetting->set(
"rep_shorten_description", $form->getInput(
'rep_shorten_description'));
264 $ilSetting->set(
"rep_shorten_description_length", (
int)$form->getInput(
'rep_shorten_description_length'));
265 $ilSetting->set(
'item_cmd_asynch',(
int)
$_POST[
'item_cmd_asynch']);
266 $ilSetting->set(
'comments_tagging_in_lists',(
int) $_POST[
'comments_tagging_in_lists']);
267 $ilSetting->set(
'comments_tagging_in_lists_tags',(
int) $_POST[
'comments_tagging_in_lists_tags']);
269 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
270 if ($form->getInput(
'change_event_tracking'))
280 $this->ctrl->redirect($this,
"view");
283 $form->setValuesByPost();
289 $this->tabs_gui->activateTab(
"icons");
296 $this->tpl->setContent($a_form->getHTML());
303 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
304 include_once
"Services/Form/classes/class.ilCombinationInputGUI.php";
306 $form->setTitle($this->lng->txt(
"rep_custom_icons"));
307 $form->setFormAction($this->ctrl->getFormAction($this,
'saveCustomIcons'));
310 $cb->
setInfo($this->lng->txt(
"enable_custom_icons_info"));
311 $cb->setChecked($ilSetting->get(
"custom_icons"));
357 $form->addCommandButton(
'saveCustomIcons', $this->lng->txt(
'save'));
367 if ($form->checkInput())
369 $ilSetting->set(
"custom_icons", (
int)$form->getInput(
"custom_icons"));
379 $this->ctrl->redirect($this,
"customIcons");
382 $form->setValuesByPost();
388 $this->tabs_gui->activateTab(
'modules');
390 $this->tabs_gui->addSubTab(
"list_mods",
391 $this->lng->txt(
"rep_new_item_menu"),
392 $this->ctrl->getLinkTarget($this,
"listModules"));
394 $this->tabs_gui->addSubTab(
"new_item_groups",
395 $this->lng->txt(
"rep_new_item_groups"),
396 $this->ctrl->getLinkTarget($this,
"listNewItemGroups"));
398 $this->tabs_gui->activateSubTab($a_active);
405 include_once(
"./Services/Repository/classes/class.ilModulesTableGUI.php");
408 $this->tpl->setContent($comp_table->getHTML());
415 if(!is_array(
$_POST[
"obj_grp"]) ||
416 !is_array(
$_POST[
"obj_pos"]))
418 $ilCtrl->redirect($this,
"listModules");
421 $grp_pos_map = array(0 => 9999);
422 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
425 $grp_pos_map[$item[
"id"]] = $item[
"pos"];
428 $type_pos_map = array();
429 foreach(
$_POST[
"obj_pos"] as $obj_type => $pos)
431 $grp_id = (int)
$_POST[
"obj_grp"][$obj_type];
432 $type_pos_map[$grp_id][$obj_type] = $pos;
435 $ilSetting->set(
"obj_dis_creation_".$obj_type, !(
int)
$_POST[
"obj_enbl_creation"][$obj_type]);
438 foreach($type_pos_map as $grp_id => $obj_types)
440 $grp_pos = str_pad($grp_pos_map[$grp_id], 4,
"0", STR_PAD_LEFT);
444 foreach(array_keys($obj_types) as $obj_type)
447 $type_pos = $grp_pos.str_pad($pos, 4,
"0", STR_PAD_LEFT);
448 $ilSetting->set(
"obj_add_new_pos_".$obj_type, $type_pos);
449 $ilSetting->set(
"obj_add_new_pos_grp_".$obj_type, $grp_id);
465 $ilCtrl->redirect($this,
"listModules");
474 $ilToolbar->addButton($this->lng->txt(
"rep_new_item_group_add"),
475 $this->ctrl->getLinkTarget($this,
"addNewItemGroup"));
477 $ilToolbar->addButton($this->lng->txt(
"rep_new_item_group_add_separator"),
478 $this->ctrl->getLinkTarget($this,
"addNewItemGroupSeparator"));
480 include_once(
"./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
483 $this->tpl->setContent($grp_table->getHTML());
490 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
493 $this->lng->loadLanguageModule(
"meta");
494 $def_lng = $this->lng->getDefaultLanguage();
496 $title =
new ilTextInputGUI($this->lng->txt(
"title"),
"title_".$def_lng);
497 $title->
setInfo($this->lng->txt(
"meta_l_".$def_lng).
498 " (".$this->lng->txt(
"default_language").
")");
499 $title->setRequired(
true);
500 $form->addItem($title);
502 foreach($this->lng->getInstalledLanguages() as $lang_id)
504 if($lang_id != $def_lng)
506 $title =
new ilTextInputGUI($this->lng->txt(
"translation"),
"title_".$lang_id);
507 $title->
setInfo($this->lng->txt(
"meta_l_".$lang_id));
508 $form->addItem($title);
514 $form->setTitle($this->lng->txt(
"rep_new_item_group_add"));
515 $form->setFormAction($this->ctrl->getFormAction($this,
"saveNewItemGroup"));
517 $form->addCommandButton(
"saveNewItemGroup", $this->lng->txt(
"save"));
521 $form->setTitle($this->lng->txt(
"rep_new_item_group_edit"));
522 $form->setFormAction($this->ctrl->getFormAction($this,
"updateNewItemGroup"));
524 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
526 $grp = $grp[$a_grp_id];
528 foreach($grp[
"titles"] as $id => $value)
530 $field = $form->getItemByPostVar(
"title_".$id);
533 $field->setValue($value);
537 $form->addCommandButton(
"updateNewItemGroup", $this->lng->txt(
"save"));
539 $form->addCommandButton(
"listNewItemGroups", $this->lng->txt(
"cancel"));
551 $this->tpl->setContent($a_form->getHTML());
557 if($form->checkInput())
560 foreach($this->lng->getInstalledLanguages() as $lang_id)
562 $titles[$lang_id] = $form->getInput(
"title_".$lang_id);
565 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
569 $this->ctrl->redirect($this,
"listNewItemGroups");
573 $form->setValuesByPost();
579 $grp_id = (int)
$_GET[
"grp_id"];
582 $this->ctrl->redirect($this,
"listNewItemGroups");
587 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
591 $this->tpl->setContent($a_form->getHTML());
596 $grp_id = (int)
$_GET[
"grp_id"];
599 $this->ctrl->redirect($this,
"listNewItemGroups");
602 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
605 if($form->checkInput())
608 foreach($this->lng->getInstalledLanguages() as $lang_id)
610 $titles[$lang_id] = $form->getInput(
"title_".$lang_id);
613 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
617 $this->ctrl->redirect($this,
"listNewItemGroups");
621 $form->setValuesByPost();
627 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
632 $this->ctrl->redirect($this,
"listNewItemGroups");
639 if(is_array(
$_POST[
"grp_order"]))
641 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
644 $grp_pos_map = array();
645 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
648 $grp_pos_map[$item[
"id"]] = str_pad($item[
"pos"], 4,
"0", STR_PAD_LEFT);
657 foreach($subitems as $obj_type)
659 $old_pos = $ilSetting->get(
"obj_add_new_pos_".$obj_type);
660 if(strlen($old_pos) == 8)
662 $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
663 $ilSetting->set(
"obj_add_new_pos_".$obj_type, $new_pos);
671 $this->ctrl->redirect($this,
"listNewItemGroups");
676 if(!is_array(
$_POST[
"grp_id"]))
684 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
686 $cgui->setHeaderText($this->lng->txt(
"rep_new_item_group_delete_sure"));
688 $cgui->setFormAction($this->ctrl->getFormAction($this));
689 $cgui->setCancel($this->lng->txt(
"cancel"),
"listNewItemGroups");
690 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteNewItemGroup");
692 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
695 foreach (
$_POST[
"grp_id"] as $grp_id)
697 $cgui->addItem(
"grp_id[]", $grp_id, $groups[$grp_id][
"title"]);
700 $this->tpl->setContent($cgui->getHTML());
705 if(!is_array(
$_POST[
"grp_id"]))
710 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
711 foreach(
$_POST[
"grp_id"] as $grp_id)
717 $this->ctrl->redirect($this,
"listNewItemGroups");
728 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
731 return array(array(
"view", $fields));
741 return array(array(
"view", $fields));
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
view(ilPropertyFormGUI $a_form=null)
This class represents an option in a radio group.
static _activate()
Activates change event tracking.
static addNewItemGroupSeparator()
TableGUI class for new item groups.
confirmDeleteNewItemGroup()
static getNewItemGroups()
customIcons(ilPropertyFormGUI $a_form=null)
setModuleSubTabs($a_active)
addNewItemGroupSeparator()
setInfo($a_info)
Set Info.
static getNewItemGroupSubItems()
static deleteNewItemGroup($a_id)
if(!is_array($argv)) $options
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
addToExternalSettingsForm($a_form_id)
prepareOutput()
prepare output
static updateNewItemGroupOrder(array $a_order)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static addNewItemGroup(array $a_titles)
static _isActive()
Returns true, if change event tracking is active.
static _deactivate()
Deactivates change event tracking.
initNewItemGroupForm($a_grp_id=false)
static updateNewItemGroup($a_id, array $a_titles)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
TableGUI class for module listing.
addNewItemGroup(ilPropertyFormGUI $a_form=null)
editNewItemGroup(ilPropertyFormGUI $a_form=null)
Confirmation screen class.