3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
27 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
31 $this->error = $DIC[
"ilErr"];
32 $this->access = $DIC->access();
33 $this->rbacsystem = $DIC->rbac()->system();
35 $this->ctrl = $DIC->ctrl();
36 $this->lng = $DIC->language();
37 $this->toolbar = $DIC->toolbar();
38 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
41 $this->lng->loadLanguageModule(
'rep');
42 $this->lng->loadLanguageModule(
'cmps');
50 $next_class = $this->ctrl->getNextClass($this);
51 $cmd = $this->ctrl->getCmd();
55 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
56 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
59 switch ($next_class) {
60 case 'ilpermissiongui':
61 $this->tabs_gui->setTabActive(
'perm_settings');
62 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
64 $this->ctrl->forwardCommand($perm_gui);
78 $this->tabs_gui->addTab(
80 $this->lng->txt(
"settings"),
81 $this->ctrl->getLinkTarget($this,
"view")
84 $this->tabs_gui->addTab(
86 $this->lng->txt(
"rep_custom_icons"),
87 $this->ctrl->getLinkTarget($this,
"customIcons")
90 $this->tabs_gui->addTab(
92 $this->lng->txt(
"cmps_repository_object_types"),
93 $this->ctrl->getLinkTarget($this,
"listModules")
96 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
97 $this->tabs_gui->addTab(
99 $this->lng->txt(
"perm_settings"),
100 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
107 $this->tabs_gui->activateTab(
"settings");
113 $this->tpl->setContent($a_form->getHTML());
121 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
123 $form->setTitle($this->lng->txt(
"settings"));
124 $form->setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
128 "flat" => $this->lng->txt(
"flatview"),
129 "tree" => $this->lng->txt(
"treeview")
133 $si->setInfo($this->lng->txt(
""));
134 if (
$ilSetting->get(
"default_repository_view") ==
"tree") {
135 $si->setValue(
"tree");
137 $si->setValue(
"flat");
143 "" => $this->lng->txt(
"adm_rep_tree_only_container"),
144 "tree" => $this->lng->txt(
"adm_all_resource_types")
151 $this->lng->txt(
"adm_rep_tree_only_cntr"),
153 $this->lng->txt(
"adm_rep_tree_only_cntr_info")
155 $radg->addOption($op1);
158 $this->lng->txt(
"adm_rep_tree_all_types"),
160 $this->lng->txt(
"adm_rep_tree_all_types_info")
164 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_tree_limit_grp_crs"),
"rep_tree_limit_grp_crs");
165 $cb->setChecked(
$ilSetting->get(
"rep_tree_limit_grp_crs"));
166 $cb->
setInfo($this->lng->txt(
"adm_rep_tree_limit_grp_crs_info"));
167 $op2->addSubItem($cb);
169 $radg->addOption($op2);
171 $form->addItem($radg);
174 $tree_limit =
new ilCheckboxInputGUI($this->lng->txt(
"rep_tree_limit"),
"rep_tree_limit");
176 $tree_limit->setInfo($this->lng->txt(
"rep_tree_limit_info"));
177 $form->addItem($tree_limit);
180 $tree_limit_number =
new ilNumberInputGUI($this->lng->txt(
"rep_tree_limit_number"),
"rep_tree_limit_number");
182 $tree_limit_number->setSize(3);
183 $tree_limit_number->setValue(
$ilSetting->get(
"rep_tree_limit_number"));
184 $tree_limit_number->setInfo($this->lng->txt(
"rep_tree_limit_number_info"));
185 $tree_limit->addSubItem($tree_limit_number);
189 $cb->setChecked((
int)
$ilSetting->get(
"rep_breadcr_crs"));
192 $radg =
new ilRadioGroupInputGUI($this->lng->txt(
"rep_breadcr_crs"),
"rep_breadcr_crs_overwrite");
195 $op0 =
new ilRadioOption($this->lng->txt(
"rep_breadcr_crs_overwrite"), 1);
196 $cb0 =
new ilCheckboxInputGUI($this->lng->txt(
"rep_default"),
"rep_breadcr_crs_default");
197 $cb0->setChecked((
int)
$ilSetting->get(
"rep_breadcr_crs_default"));
199 $radg->addOption($op0);
201 $op1 =
new ilRadioOption($this->lng->txt(
"rep_breadcr_crs_overwrite_not"), 0);
202 $radg->addOption($op1);
211 $cb->
setInfo($this->lng->txt(
"enable_trash_info"));
213 $cb->setChecked(
true);
218 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
219 $this->lng->loadLanguageModule(
"trac");
220 $event =
new ilCheckboxInputGUI($this->lng->txt(
'trac_show_repository_views'),
'change_event_tracking');
221 $event->
setInfo($this->lng->txt(
"trac_show_repository_views_info"));
223 $form->addItem($event);
226 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
237 $lists->setTitle($this->lng->txt(
"rep_object_lists"));
238 $form->addItem($lists);
240 $sdesc =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_shorten_description"),
"rep_shorten_description");
241 $sdesc->
setInfo($this->lng->txt(
"adm_rep_shorten_description_info"));
242 $sdesc->setChecked(
$ilSetting->get(
"rep_shorten_description"));
243 $form->addItem($sdesc);
245 $sdesclen =
new ilNumberInputGUI($this->lng->txt(
"adm_rep_shorten_description_length"),
"rep_shorten_description_length");
247 $sdesclen->setSize(3);
248 $sdesc->addSubItem($sdesclen);
251 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_item_cmd_asynch"),
"item_cmd_asynch");
252 $cb->
setInfo($this->lng->txt(
"adm_item_cmd_asynch_info"));
253 $cb->setChecked(
$ilSetting->get(
"item_cmd_asynch"));
257 $pl =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists'),
'comments_tagging_in_lists');
259 $pl->setChecked(
$ilSetting->get(
'comments_tagging_in_lists'));
262 $pltags =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists_tags'),
'comments_tagging_in_lists_tags');
264 $pltags->setChecked(
$ilSetting->get(
'comments_tagging_in_lists_tags'));
265 $pl->addSubItem($pltags);
267 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
268 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
279 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
280 $this->ctrl->redirect($this,
"view");
284 if (
$form->checkInput()) {
288 if (
$_POST[
"tree_pres"] ==
"") {
289 $_POST[
"rep_tree_limit_grp_crs"] =
"";
291 if (
$_POST[
"rep_tree_limit_grp_crs"] && !
$ilSetting->get(
"rep_tree_limit_grp_crs")) {
292 $_POST[
"rep_tree_synchronize"] =
true;
293 } elseif (!
$_POST[
"rep_tree_synchronize"] &&
$ilSetting->get(
"rep_tree_synchronize")) {
294 $_POST[
"rep_tree_limit_grp_crs"] =
false;
296 $ilSetting->set(
"rep_tree_limit_grp_crs",
$_POST[
"rep_tree_limit_grp_crs"]);
304 $ilSetting->set(
"rep_breadcr_crs_overwrite", (
int)
$_POST[
"rep_breadcr_crs_overwrite"]);
305 $ilSetting->set(
"rep_breadcr_crs", (
int) $_POST[
"rep_breadcr_crs"]);
306 $ilSetting->set(
"rep_breadcr_crs_default", (
int) $_POST[
"rep_breadcr_crs_default"]);
309 $ilSetting->set(
"rep_shorten_description",
$form->getInput(
'rep_shorten_description'));
310 $ilSetting->set(
"rep_shorten_description_length", (
int)
$form->getInput(
'rep_shorten_description_length'));
311 $ilSetting->set(
'item_cmd_asynch', (
int) $_POST[
'item_cmd_asynch']);
312 $ilSetting->set(
'comments_tagging_in_lists', (
int) $_POST[
'comments_tagging_in_lists']);
313 $ilSetting->set(
'comments_tagging_in_lists_tags', (
int) $_POST[
'comments_tagging_in_lists_tags']);
316 $limit_number = ($_POST[
'rep_tree_limit'] && $_POST[
'rep_tree_limit_number'] > 0)
317 ? (
int) $_POST[
'rep_tree_limit_number']
319 $ilSetting->set(
'rep_tree_limit_number', $limit_number);
321 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
322 if (
$form->getInput(
'change_event_tracking')) {
328 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
329 $this->ctrl->redirect($this,
"view");
332 $form->setValuesByPost();
338 $this->tabs_gui->activateTab(
"icons");
344 $this->tpl->setContent($a_form->getHTML());
352 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
353 include_once
"Services/Form/classes/class.ilCombinationInputGUI.php";
355 $form->setTitle($this->lng->txt(
"rep_custom_icons"));
356 $form->setFormAction($this->ctrl->getFormAction($this,
'saveCustomIcons'));
359 $cb->
setInfo($this->lng->txt(
"enable_custom_icons_info"));
360 $cb->setChecked(
$ilSetting->get(
"custom_icons"));
363 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
364 $form->addCommandButton(
'saveCustomIcons', $this->lng->txt(
'save'));
375 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
376 $this->ctrl->redirect($this,
"customIcons");
380 if (
$form->checkInput()) {
381 $ilSetting->set(
"custom_icons", (
int)
$form->getInput(
"custom_icons"));
382 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
383 $this->ctrl->redirect($this,
"customIcons");
386 $form->setValuesByPost();
392 $this->tabs_gui->activateTab(
'modules');
394 $this->tabs_gui->addSubTab(
396 $this->lng->txt(
"rep_new_item_menu"),
397 $this->ctrl->getLinkTarget($this,
"listModules")
400 $this->tabs_gui->addSubTab(
402 $this->lng->txt(
"rep_new_item_groups"),
403 $this->ctrl->getLinkTarget($this,
"listNewItemGroups")
406 $this->tabs_gui->activateSubTab($a_active);
415 $has_write = $ilAccess->checkAccess(
'write',
'', $this->object->getRefId());
417 include_once(
"./Services/Repository/classes/class.ilModulesTableGUI.php");
420 $this->tpl->setContent($comp_table->getHTML());
430 if (!is_array(
$_POST[
"obj_grp"]) ||
431 !is_array(
$_POST[
"obj_pos"]) ||
432 !$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
433 $ilCtrl->redirect($this,
"listModules");
436 $grp_pos_map = array(0 => 9999);
437 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
439 $grp_pos_map[$item[
"id"]] = $item[
"pos"];
442 $type_pos_map = array();
443 foreach (
$_POST[
"obj_pos"] as $obj_type => $pos) {
444 $grp_id = (int)
$_POST[
"obj_grp"][$obj_type];
445 $type_pos_map[$grp_id][$obj_type] = $pos;
448 $ilSetting->set(
"obj_dis_creation_" . $obj_type, !(
int)
$_POST[
"obj_enbl_creation"][$obj_type]);
451 foreach ($type_pos_map as $grp_id => $obj_types) {
452 $grp_pos = str_pad($grp_pos_map[$grp_id], 4,
"0", STR_PAD_LEFT);
456 foreach (array_keys($obj_types) as $obj_type) {
458 $type_pos = $grp_pos . str_pad($pos, 4,
"0", STR_PAD_LEFT);
459 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $type_pos);
460 $ilSetting->set(
"obj_add_new_pos_grp_" . $obj_type, $grp_id);
475 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
476 $ilCtrl->redirect($this,
"listModules");
486 $has_write = $ilAccess->checkAccess(
'write',
'', $this->object->getRefId());
489 $ilToolbar->addButton(
490 $this->lng->txt(
"rep_new_item_group_add"),
491 $this->ctrl->getLinkTarget($this,
"addNewItemGroup")
494 $ilToolbar->addButton(
495 $this->lng->txt(
"rep_new_item_group_add_separator"),
496 $this->ctrl->getLinkTarget($this,
"addNewItemGroupSeparator")
500 include_once(
"./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
503 $this->tpl->setContent($grp_table->getHTML());
510 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
513 $this->lng->loadLanguageModule(
"meta");
514 $def_lng = $this->lng->getDefaultLanguage();
517 $title->setInfo($this->lng->txt(
"meta_l_" . $def_lng) .
518 " (" . $this->lng->txt(
"default_language") .
")");
519 $title->setRequired(
true);
522 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
523 if ($lang_id != $def_lng) {
525 $title->setInfo($this->lng->txt(
"meta_l_" . $lang_id));
531 $form->setTitle($this->lng->txt(
"rep_new_item_group_add"));
532 $form->setFormAction($this->ctrl->getFormAction($this,
"saveNewItemGroup"));
534 $form->addCommandButton(
"saveNewItemGroup", $this->lng->txt(
"save"));
536 $form->setTitle($this->lng->txt(
"rep_new_item_group_edit"));
537 $form->setFormAction($this->ctrl->getFormAction($this,
"updateNewItemGroup"));
539 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
541 $grp = $grp[$a_grp_id];
543 foreach ($grp[
"titles"] as
$id => $value) {
544 $field =
$form->getItemByPostVar(
"title_" .
$id);
546 $field->setValue($value);
550 $form->addCommandButton(
"updateNewItemGroup", $this->lng->txt(
"save"));
552 $form->addCommandButton(
"listNewItemGroups", $this->lng->txt(
"cancel"));
563 $this->tpl->setContent($a_form->getHTML());
569 if (
$form->checkInput()) {
571 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
572 $titles[$lang_id] =
$form->getInput(
"title_" . $lang_id);
575 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
577 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
578 $this->ctrl->redirect($this,
"listNewItemGroups");
582 $form->setValuesByPost();
588 $grp_id = (int)
$_GET[
"grp_id"];
590 $this->ctrl->redirect($this,
"listNewItemGroups");
594 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
598 $this->tpl->setContent($a_form->getHTML());
603 $grp_id = (int)
$_GET[
"grp_id"];
605 $this->ctrl->redirect($this,
"listNewItemGroups");
608 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
611 if (
$form->checkInput()) {
613 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
614 $titles[$lang_id] =
$form->getInput(
"title_" . $lang_id);
617 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
619 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
620 $this->ctrl->redirect($this,
"listNewItemGroups");
624 $form->setValuesByPost();
630 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
632 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
634 $this->ctrl->redirect($this,
"listNewItemGroups");
641 if (is_array(
$_POST[
"grp_order"])) {
642 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
645 $grp_pos_map = array();
646 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
648 $grp_pos_map[$item[
"id"]] = str_pad($item[
"pos"], 4,
"0", STR_PAD_LEFT);
655 foreach ($subitems as $obj_type) {
656 $old_pos =
$ilSetting->get(
"obj_add_new_pos_" . $obj_type);
657 if (strlen($old_pos) == 8) {
658 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
659 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $new_pos);
665 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
667 $this->ctrl->redirect($this,
"listNewItemGroups");
672 if (!is_array(
$_POST[
"grp_id"])) {
679 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
681 $cgui->setHeaderText($this->lng->txt(
"rep_new_item_group_delete_sure"));
683 $cgui->setFormAction($this->ctrl->getFormAction($this));
684 $cgui->setCancel($this->lng->txt(
"cancel"),
"listNewItemGroups");
685 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteNewItemGroup");
687 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
690 foreach (
$_POST[
"grp_id"] as $grp_id) {
691 $cgui->addItem(
"grp_id[]", $grp_id, $groups[$grp_id][
"title"]);
694 $this->tpl->setContent($cgui->getHTML());
699 if (!is_array(
$_POST[
"grp_id"])) {
703 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
704 foreach (
$_POST[
"grp_id"] as $grp_id) {
708 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
709 $this->ctrl->redirect($this,
"listNewItemGroups");
716 switch ($a_form_id) {
719 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
722 return array(array(
"view", $fields));
732 return array(array(
"view", $fields));
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)
if(!array_key_exists('StateId', $_REQUEST)) $id
setModuleSubTabs($a_active)
addNewItemGroupSeparator()
setInfo($a_info)
Set Info.
static getNewItemGroupSubItems()
prepareOutput($a_show_subobjects=true)
prepare output
static deleteNewItemGroup($a_id)
if(isset($_POST['submit'])) $form
addSubItem($a_item)
Add Subitem.
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)
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.