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::__construct($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(
'read',
'', $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_show_repository_views'),
'change_event_tracking');
183 $event->
setInfo($this->lng->txt(
"trac_show_repository_views_info"));
185 $form->addItem($event);
188 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
199 $lists->setTitle($this->lng->txt(
"rep_object_lists"));
200 $form->addItem($lists);
202 $sdesc =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_shorten_description"),
"rep_shorten_description");
203 $sdesc->
setInfo($this->lng->txt(
"adm_rep_shorten_description_info"));
204 $sdesc->setChecked($ilSetting->get(
"rep_shorten_description"));
205 $form->addItem($sdesc);
207 $sdesclen =
new ilNumberInputGUI($this->lng->txt(
"adm_rep_shorten_description_length"),
"rep_shorten_description_length");
208 $sdesclen->
setValue($ilSetting->get(
"rep_shorten_description_length"));
209 $sdesclen->setSize(3);
210 $sdesc->addSubItem($sdesclen);
213 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_item_cmd_asynch"),
"item_cmd_asynch");
214 $cb->
setInfo($this->lng->txt(
"adm_item_cmd_asynch_info"));
215 $cb->setChecked($ilSetting->get(
"item_cmd_asynch"));
219 $pl =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists'),
'comments_tagging_in_lists');
221 $pl->setChecked($ilSetting->get(
'comments_tagging_in_lists'));
224 $pltags =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists_tags'),
'comments_tagging_in_lists_tags');
226 $pltags->setChecked($ilSetting->get(
'comments_tagging_in_lists_tags'));
227 $pl->addSubItem($pltags);
229 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
231 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
241 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
243 $this->ctrl->redirect($this,
"view");
247 if ($form->checkInput())
249 $ilSetting->set(
"default_repository_view",
$_POST[
"default_rep_view"]);
251 $ilSetting->set(
"repository_tree_pres",
$_POST[
"tree_pres"]);
252 if (
$_POST[
"tree_pres"] ==
"")
254 $_POST[
"rep_tree_limit_grp_crs"] =
"";
256 if (
$_POST[
"rep_tree_limit_grp_crs"] && !$ilSetting->get(
"rep_tree_limit_grp_crs"))
258 $_POST[
"rep_tree_synchronize"] =
true;
260 else if (!
$_POST[
"rep_tree_synchronize"] && $ilSetting->get(
"rep_tree_synchronize"))
262 $_POST[
"rep_tree_limit_grp_crs"] =
false;
264 $ilSetting->set(
"rep_tree_limit_grp_crs",
$_POST[
"rep_tree_limit_grp_crs"]);
269 $ilSetting->set(
"enable_trash",
$_POST[
"enable_trash"]);
271 $ilSetting->set(
"rep_shorten_description", $form->getInput(
'rep_shorten_description'));
272 $ilSetting->set(
"rep_shorten_description_length", (
int)$form->getInput(
'rep_shorten_description_length'));
273 $ilSetting->set(
'item_cmd_asynch',(
int)
$_POST[
'item_cmd_asynch']);
274 $ilSetting->set(
'comments_tagging_in_lists',(
int) $_POST[
'comments_tagging_in_lists']);
275 $ilSetting->set(
'comments_tagging_in_lists_tags',(
int) $_POST[
'comments_tagging_in_lists_tags']);
277 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
278 if ($form->getInput(
'change_event_tracking'))
288 $this->ctrl->redirect($this,
"view");
291 $form->setValuesByPost();
297 $this->tabs_gui->activateTab(
"icons");
304 $this->tpl->setContent($a_form->getHTML());
311 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
312 include_once
"Services/Form/classes/class.ilCombinationInputGUI.php";
314 $form->setTitle($this->lng->txt(
"rep_custom_icons"));
315 $form->setFormAction($this->ctrl->getFormAction($this,
'saveCustomIcons'));
318 $cb->
setInfo($this->lng->txt(
"enable_custom_icons_info"));
319 $cb->setChecked($ilSetting->get(
"custom_icons"));
322 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
324 $form->addCommandButton(
'saveCustomIcons', $this->lng->txt(
'save'));
334 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
336 $this->ctrl->redirect($this,
"customIcons");
340 if ($form->checkInput())
342 $ilSetting->set(
"custom_icons", (
int)$form->getInput(
"custom_icons"));
344 $this->ctrl->redirect($this,
"customIcons");
347 $form->setValuesByPost();
353 $this->tabs_gui->activateTab(
'modules');
355 $this->tabs_gui->addSubTab(
"list_mods",
356 $this->lng->txt(
"rep_new_item_menu"),
357 $this->ctrl->getLinkTarget($this,
"listModules"));
359 $this->tabs_gui->addSubTab(
"new_item_groups",
360 $this->lng->txt(
"rep_new_item_groups"),
361 $this->ctrl->getLinkTarget($this,
"listNewItemGroups"));
363 $this->tabs_gui->activateSubTab($a_active);
372 $has_write = $ilAccess->checkAccess(
'write',
'',$this->
object->getRefId());
374 include_once(
"./Services/Repository/classes/class.ilModulesTableGUI.php");
377 $this->tpl->setContent($comp_table->getHTML());
384 if(!is_array(
$_POST[
"obj_grp"]) ||
385 !is_array(
$_POST[
"obj_pos"]) ||
386 !$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
388 $ilCtrl->redirect($this,
"listModules");
391 $grp_pos_map =
array(0 => 9999);
392 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
395 $grp_pos_map[$item[
"id"]] = $item[
"pos"];
398 $type_pos_map =
array();
399 foreach(
$_POST[
"obj_pos"] as $obj_type => $pos)
401 $grp_id = (int)
$_POST[
"obj_grp"][$obj_type];
402 $type_pos_map[$grp_id][$obj_type] = $pos;
405 $ilSetting->set(
"obj_dis_creation_".$obj_type, !(
int)
$_POST[
"obj_enbl_creation"][$obj_type]);
408 foreach($type_pos_map as $grp_id => $obj_types)
410 $grp_pos = str_pad($grp_pos_map[$grp_id], 4,
"0", STR_PAD_LEFT);
414 foreach(array_keys($obj_types) as $obj_type)
417 $type_pos = $grp_pos.str_pad($pos, 4,
"0", STR_PAD_LEFT);
418 $ilSetting->set(
"obj_add_new_pos_".$obj_type, $type_pos);
419 $ilSetting->set(
"obj_add_new_pos_grp_".$obj_type, $grp_id);
435 $ilCtrl->redirect($this,
"listModules");
440 global $ilToolbar, $ilAccess;
444 $has_write = $ilAccess->checkAccess(
'write',
'',$this->
object->getRefId());
448 $ilToolbar->addButton($this->lng->txt(
"rep_new_item_group_add"),
449 $this->ctrl->getLinkTarget($this,
"addNewItemGroup"));
451 $ilToolbar->addButton($this->lng->txt(
"rep_new_item_group_add_separator"),
452 $this->ctrl->getLinkTarget($this,
"addNewItemGroupSeparator"));
455 include_once(
"./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
458 $this->tpl->setContent($grp_table->getHTML());
465 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
468 $this->lng->loadLanguageModule(
"meta");
469 $def_lng = $this->lng->getDefaultLanguage();
472 $title->setInfo($this->lng->txt(
"meta_l_".$def_lng).
473 " (".$this->lng->txt(
"default_language").
")");
474 $title->setRequired(
true);
477 foreach($this->lng->getInstalledLanguages() as $lang_id)
479 if($lang_id != $def_lng)
482 $title->setInfo($this->lng->txt(
"meta_l_".$lang_id));
489 $form->setTitle($this->lng->txt(
"rep_new_item_group_add"));
490 $form->setFormAction($this->ctrl->getFormAction($this,
"saveNewItemGroup"));
492 $form->addCommandButton(
"saveNewItemGroup", $this->lng->txt(
"save"));
496 $form->setTitle($this->lng->txt(
"rep_new_item_group_edit"));
497 $form->setFormAction($this->ctrl->getFormAction($this,
"updateNewItemGroup"));
499 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
501 $grp = $grp[$a_grp_id];
503 foreach($grp[
"titles"] as $id => $value)
505 $field = $form->getItemByPostVar(
"title_".$id);
508 $field->setValue($value);
512 $form->addCommandButton(
"updateNewItemGroup", $this->lng->txt(
"save"));
514 $form->addCommandButton(
"listNewItemGroups", $this->lng->txt(
"cancel"));
526 $this->tpl->setContent($a_form->getHTML());
532 if($form->checkInput())
535 foreach($this->lng->getInstalledLanguages() as $lang_id)
537 $titles[$lang_id] = $form->getInput(
"title_".$lang_id);
540 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
544 $this->ctrl->redirect($this,
"listNewItemGroups");
548 $form->setValuesByPost();
554 $grp_id = (int)
$_GET[
"grp_id"];
557 $this->ctrl->redirect($this,
"listNewItemGroups");
562 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
566 $this->tpl->setContent($a_form->getHTML());
571 $grp_id = (int)
$_GET[
"grp_id"];
574 $this->ctrl->redirect($this,
"listNewItemGroups");
577 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
580 if($form->checkInput())
583 foreach($this->lng->getInstalledLanguages() as $lang_id)
585 $titles[$lang_id] = $form->getInput(
"title_".$lang_id);
588 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
592 $this->ctrl->redirect($this,
"listNewItemGroups");
596 $form->setValuesByPost();
602 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
607 $this->ctrl->redirect($this,
"listNewItemGroups");
614 if(is_array(
$_POST[
"grp_order"]))
616 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
619 $grp_pos_map =
array();
620 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
623 $grp_pos_map[$item[
"id"]] = str_pad($item[
"pos"], 4,
"0", STR_PAD_LEFT);
632 foreach($subitems as $obj_type)
634 $old_pos = $ilSetting->get(
"obj_add_new_pos_".$obj_type);
635 if(strlen($old_pos) == 8)
637 $new_pos = $grp_pos_map[$grp_id].substr($old_pos, 4);
638 $ilSetting->set(
"obj_add_new_pos_".$obj_type, $new_pos);
646 $this->ctrl->redirect($this,
"listNewItemGroups");
651 if(!is_array(
$_POST[
"grp_id"]))
659 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
661 $cgui->setHeaderText($this->lng->txt(
"rep_new_item_group_delete_sure"));
663 $cgui->setFormAction($this->ctrl->getFormAction($this));
664 $cgui->setCancel($this->lng->txt(
"cancel"),
"listNewItemGroups");
665 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteNewItemGroup");
667 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
670 foreach (
$_POST[
"grp_id"] as $grp_id)
672 $cgui->addItem(
"grp_id[]", $grp_id, $groups[$grp_id][
"title"]);
675 $this->tpl->setContent($cgui->getHTML());
680 if(!is_array(
$_POST[
"grp_id"]))
685 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
686 foreach(
$_POST[
"grp_id"] as $grp_id)
692 $this->ctrl->redirect($this,
"listNewItemGroups");
703 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
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()
prepareOutput($a_show_subobjects=true)
prepare output
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)
Create styles array
The data for the language used.
static updateNewItemGroupOrder(array $a_order)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static addNewItemGroup(array $a_titles)
Create new PHPExcel object
obj_idprivate
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.