31 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
35 $this->error = $DIC[
"ilErr"];
36 $this->access = $DIC->access();
37 $this->rbacsystem = $DIC->rbac()->system();
39 $this->folder_settings =
new ilSetting(
'fold');
40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
42 $this->toolbar = $DIC->toolbar();
46 $this->lng->loadLanguageModule(
'rep');
47 $this->lng->loadLanguageModule(
'cmps');
55 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
60 if (!$ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
61 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
64 switch ($next_class) {
65 case 'ilpermissiongui':
66 $this->tabs_gui->setTabActive(
'perm_settings');
68 $this->ctrl->forwardCommand($perm_gui);
82 $this->tabs_gui->addTab(
84 $this->lng->txt(
"settings"),
85 $this->ctrl->getLinkTarget($this,
"view")
88 $this->tabs_gui->addTab(
90 $this->lng->txt(
"rep_custom_icons"),
91 $this->ctrl->getLinkTarget($this,
"customIcons")
94 $this->tabs_gui->addTab(
96 $this->lng->txt(
"cmps_repository_object_types"),
97 $this->ctrl->getLinkTarget($this,
"listModules")
100 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
101 $this->tabs_gui->addTab(
103 $this->lng->txt(
"perm_settings"),
104 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
111 $this->tabs_gui->activateTab(
"settings");
117 $this->tpl->setContent($a_form->getHTML());
126 $form->setTitle($this->lng->txt(
"settings"));
127 $form->setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
147 "" => $this->lng->txt(
"adm_rep_tree_only_container"),
148 "tree" => $this->lng->txt(
"adm_all_resource_types")
155 $this->lng->txt(
"adm_rep_tree_only_cntr"),
157 $this->lng->txt(
"adm_rep_tree_only_cntr_info")
159 $radg->addOption($op1);
162 $this->lng->txt(
"adm_rep_tree_all_types"),
164 $this->lng->txt(
"adm_rep_tree_all_types_info")
168 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_tree_limit_grp_crs"),
"rep_tree_limit_grp_crs");
169 $cb->setChecked(
$ilSetting->get(
"rep_tree_limit_grp_crs"));
170 $cb->
setInfo($this->lng->txt(
"adm_rep_tree_limit_grp_crs_info"));
171 $op2->addSubItem($cb);
173 $radg->addOption($op2);
175 $form->addItem($radg);
178 $tree_limit =
new ilCheckboxInputGUI($this->lng->txt(
"rep_tree_limit"),
"rep_tree_limit");
180 $tree_limit->setInfo($this->lng->txt(
"rep_tree_limit_info"));
181 $form->addItem($tree_limit);
184 $tree_limit_number =
new ilNumberInputGUI($this->lng->txt(
"rep_tree_limit_number"),
"rep_tree_limit_number");
186 $tree_limit_number->setSize(3);
187 $tree_limit_number->setValue(
$ilSetting->get(
"rep_tree_limit_number"));
188 $tree_limit_number->setInfo($this->lng->txt(
"rep_tree_limit_number_info"));
189 $tree_limit->addSubItem($tree_limit_number);
193 $cb->setChecked((
int)
$ilSetting->get(
"rep_breadcr_crs"));
196 $radg =
new ilRadioGroupInputGUI($this->lng->txt(
"rep_breadcr_crs_config"),
"rep_breadcr_crs_overwrite");
199 $op0 =
new ilRadioOption($this->lng->txt(
"rep_breadcr_crs_overwrite"), 1);
200 $cb0 =
new ilCheckboxInputGUI($this->lng->txt(
"rep_crs_default_shortened"),
"rep_breadcr_crs_default");
201 $cb0->setChecked((
int)
$ilSetting->get(
"rep_breadcr_crs_default"));
203 $radg->addOption($op0);
205 $op1 =
new ilRadioOption($this->lng->txt(
"rep_breadcr_crs_overwrite_not"), 0);
206 $radg->addOption($op1);
215 $cb->
setInfo($this->lng->txt(
"enable_trash_info"));
217 $cb->setChecked(
true);
222 $this->lng->loadLanguageModule(
"trac");
223 $event =
new ilCheckboxInputGUI($this->lng->txt(
'trac_show_repository_views'),
'change_event_tracking');
224 $event->
setInfo($this->lng->txt(
"trac_show_repository_views_info"));
226 $form->addItem($event);
237 $exp_limit =
new ilRadioGroupInputGUI($this->lng->txt(
"rep_export_limitation"),
"rep_export_limitation");
238 $exp_limit->
setValue($limiter->getLimitationMode());
239 $exp_limit->setInfo($this->lng->txt(
"rep_export_limitation_info"));
242 $this->lng->txt(
"rep_export_limitation_disabled"),
245 $exp_limit->addOption($op_disabled);
248 $this->lng->txt(
"rep_export_limitation_limited"),
251 $exp_limit->addOption($op_limited);
254 $exp_limit_num =
new ilNumberInputGUI($this->lng->txt(
"rep_export_limit_number"),
"rep_export_limit_number");
256 $exp_limit_num->setSize(6);
257 $exp_limit_num->setValue(
$ilSetting->get(
"rep_export_limit_number"));
258 $op_limited->addSubItem($exp_limit_num);
260 $form->addItem($exp_limit);
263 $dl_prop =
new ilCheckboxInputGUI($this->lng->txt(
"enable_download_folder"),
"enable_download_folder");
266 $dl_prop->setChecked($this->folder_settings->get(
"enable_download_folder", 0) == 1);
267 $dl_prop->setInfo($this->lng->txt(
'enable_download_folder_info'));
268 $form->addItem($dl_prop);
271 $dl_prop =
new ilCheckboxInputGUI($this->lng->txt(
"enable_multi_download"),
"enable_multi_download");
274 $dl_prop->setChecked($this->folder_settings->get(
"enable_multi_download", 0) == 1);
275 $dl_prop->setInfo($this->lng->txt(
'enable_multi_download_info'));
276 $form->addItem($dl_prop);
280 $cb->
setInfo($this->lng->txt(
"rep_favourites_info"));
281 $cb->setChecked((
bool)
$ilSetting->get(
"rep_favourites"));
288 $lists->setTitle($this->lng->txt(
"rep_object_lists"));
289 $form->addItem($lists);
291 $sdesc =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_shorten_description"),
"rep_shorten_description");
292 $sdesc->
setInfo($this->lng->txt(
"adm_rep_shorten_description_info"));
293 $sdesc->setChecked(
$ilSetting->get(
"rep_shorten_description"));
294 $form->addItem($sdesc);
296 $sdesclen =
new ilNumberInputGUI($this->lng->txt(
"adm_rep_shorten_description_length"),
"rep_shorten_description_length");
298 $sdesclen->setSize(3);
299 $sdesc->addSubItem($sdesclen);
302 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_item_cmd_asynch"),
"item_cmd_asynch");
303 $cb->
setInfo($this->lng->txt(
"adm_item_cmd_asynch_info"));
304 $cb->setChecked(
$ilSetting->get(
"item_cmd_asynch"));
308 $pl =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists'),
'comments_tagging_in_lists');
310 $pl->setChecked(
$ilSetting->get(
'comments_tagging_in_lists'));
313 $pltags =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists_tags'),
'comments_tagging_in_lists_tags');
315 $pltags->setChecked(
$ilSetting->get(
'comments_tagging_in_lists_tags'));
316 $pl->addSubItem($pltags);
318 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
319 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
330 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
331 $this->ctrl->redirect($this,
"view");
335 if ($form->checkInput()) {
339 if (
$_POST[
"tree_pres"] ==
"") {
340 $_POST[
"rep_tree_limit_grp_crs"] =
"";
342 if (
$_POST[
"rep_tree_limit_grp_crs"] && !
$ilSetting->get(
"rep_tree_limit_grp_crs")) {
343 $_POST[
"rep_tree_synchronize"] =
true;
344 } elseif (!
$_POST[
"rep_tree_synchronize"] &&
$ilSetting->get(
"rep_tree_synchronize")) {
345 $_POST[
"rep_tree_limit_grp_crs"] =
false;
347 $ilSetting->set(
"rep_tree_limit_grp_crs",
$_POST[
"rep_tree_limit_grp_crs"]);
350 $ilSetting->set(
"rep_export_limit_number",
$_POST[
"rep_export_limit_number"]);
351 $ilSetting->set(
"rep_favourites", $form->getInput(
"rep_favourites"));
359 $ilSetting->set(
"rep_breadcr_crs_overwrite", (
int)
$_POST[
"rep_breadcr_crs_overwrite"]);
360 $ilSetting->set(
"rep_breadcr_crs", (
int) $_POST[
"rep_breadcr_crs"]);
361 $ilSetting->set(
"rep_breadcr_crs_default", (
int) $_POST[
"rep_breadcr_crs_default"]);
364 $ilSetting->set(
"rep_shorten_description", $form->getInput(
'rep_shorten_description'));
365 $ilSetting->set(
"rep_shorten_description_length", (
int) $form->getInput(
'rep_shorten_description_length'));
366 $ilSetting->set(
'item_cmd_asynch', (
int) $_POST[
'item_cmd_asynch']);
367 $ilSetting->set(
'comments_tagging_in_lists', (
int) $_POST[
'comments_tagging_in_lists']);
368 $ilSetting->set(
'comments_tagging_in_lists_tags', (
int) $_POST[
'comments_tagging_in_lists_tags']);
371 $limit_number = ($_POST[
'rep_tree_limit'] && $_POST[
'rep_tree_limit_number'] > 0)
372 ? (
int) $_POST[
'rep_tree_limit_number']
374 $ilSetting->set(
'rep_tree_limit_number', $limit_number);
376 $this->folder_settings->set(
"enable_download_folder", $_POST[
"enable_download_folder"] == 1);
377 $this->folder_settings->set(
"enable_multi_download", $_POST[
"enable_multi_download"] == 1);
379 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
380 if ($form->getInput(
'change_event_tracking')) {
386 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
387 $this->ctrl->redirect($this,
"view");
390 $form->setValuesByPost();
396 $this->tabs_gui->activateTab(
"icons");
402 $this->tpl->setContent($a_form->getHTML());
411 $form->setTitle($this->lng->txt(
"rep_custom_icons"));
412 $form->setFormAction($this->ctrl->getFormAction($this,
'saveCustomIcons'));
415 $cb->
setInfo($this->lng->txt(
"enable_custom_icons_info"));
416 $cb->setChecked(
$ilSetting->get(
"custom_icons"));
419 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
420 $form->addCommandButton(
'saveCustomIcons', $this->lng->txt(
'save'));
431 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
432 $this->ctrl->redirect($this,
"customIcons");
436 if ($form->checkInput()) {
437 $ilSetting->set(
"custom_icons", (
int) $form->getInput(
"custom_icons"));
438 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
439 $this->ctrl->redirect($this,
"customIcons");
442 $form->setValuesByPost();
448 $this->tabs_gui->activateTab(
'modules');
450 $this->tabs_gui->addSubTab(
452 $this->lng->txt(
"rep_new_item_menu"),
453 $this->ctrl->getLinkTarget($this,
"listModules")
456 $this->tabs_gui->addSubTab(
458 $this->lng->txt(
"rep_new_item_groups"),
459 $this->ctrl->getLinkTarget($this,
"listNewItemGroups")
462 $this->tabs_gui->activateSubTab($a_active);
471 $has_write = $ilAccess->checkAccess(
'write',
'', $this->object->getRefId());
475 $this->tpl->setContent($comp_table->getHTML());
485 if (!is_array(
$_POST[
"obj_grp"]) ||
486 !is_array(
$_POST[
"obj_pos"]) ||
487 !$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
488 $ilCtrl->redirect($this,
"listModules");
491 $grp_pos_map = array(0 => 9999);
493 $grp_pos_map[$item[
"id"]] = $item[
"pos"];
496 $type_pos_map = array();
497 foreach (
$_POST[
"obj_pos"] as $obj_type => $pos) {
498 $grp_id = (int)
$_POST[
"obj_grp"][$obj_type];
499 $type_pos_map[$grp_id][$obj_type] = $pos;
502 $ilSetting->set(
"obj_dis_creation_" . $obj_type, !(
int)
$_POST[
"obj_enbl_creation"][$obj_type]);
505 foreach ($type_pos_map as $grp_id => $obj_types) {
506 $grp_pos = str_pad($grp_pos_map[$grp_id], 4,
"0", STR_PAD_LEFT);
510 foreach (array_keys($obj_types) as $obj_type) {
512 $type_pos = $grp_pos . str_pad($pos, 4,
"0", STR_PAD_LEFT);
513 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $type_pos);
514 $ilSetting->set(
"obj_add_new_pos_grp_" . $obj_type, $grp_id);
529 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
530 $ilCtrl->redirect($this,
"listModules");
540 $has_write = $ilAccess->checkAccess(
'write',
'', $this->object->getRefId());
543 $ilToolbar->addButton(
544 $this->lng->txt(
"rep_new_item_group_add"),
545 $this->ctrl->getLinkTarget($this,
"addNewItemGroup")
548 $ilToolbar->addButton(
549 $this->lng->txt(
"rep_new_item_group_add_separator"),
550 $this->ctrl->getLinkTarget($this,
"addNewItemGroupSeparator")
556 $this->tpl->setContent($grp_table->getHTML());
565 $this->lng->loadLanguageModule(
"meta");
566 $def_lng = $this->lng->getDefaultLanguage();
568 $title =
new ilTextInputGUI($this->lng->txt(
"title"),
"title_" . $def_lng);
569 $title->setInfo($this->lng->txt(
"meta_l_" . $def_lng) .
570 " (" . $this->lng->txt(
"default_language") .
")");
571 $title->setRequired(
true);
572 $form->addItem($title);
574 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
575 if ($lang_id != $def_lng) {
576 $title =
new ilTextInputGUI($this->lng->txt(
"translation"),
"title_" . $lang_id);
577 $title->setInfo($this->lng->txt(
"meta_l_" . $lang_id));
578 $form->addItem($title);
583 $form->setTitle($this->lng->txt(
"rep_new_item_group_add"));
584 $form->setFormAction($this->ctrl->getFormAction($this,
"saveNewItemGroup"));
586 $form->addCommandButton(
"saveNewItemGroup", $this->lng->txt(
"save"));
588 $form->setTitle($this->lng->txt(
"rep_new_item_group_edit"));
589 $form->setFormAction($this->ctrl->getFormAction($this,
"updateNewItemGroup"));
592 $grp = $grp[$a_grp_id];
594 foreach ($grp[
"titles"] as $id => $value) {
595 $field = $form->getItemByPostVar(
"title_" . $id);
597 $field->setValue($value);
601 $form->addCommandButton(
"updateNewItemGroup", $this->lng->txt(
"save"));
603 $form->addCommandButton(
"listNewItemGroups", $this->lng->txt(
"cancel"));
614 $this->tpl->setContent($a_form->getHTML());
620 if ($form->checkInput()) {
622 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
623 $titles[$lang_id] = $form->getInput(
"title_" . $lang_id);
627 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
628 $this->ctrl->redirect($this,
"listNewItemGroups");
632 $form->setValuesByPost();
638 $grp_id = (int)
$_GET[
"grp_id"];
640 $this->ctrl->redirect($this,
"listNewItemGroups");
644 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
648 $this->tpl->setContent($a_form->getHTML());
653 $grp_id = (int)
$_GET[
"grp_id"];
655 $this->ctrl->redirect($this,
"listNewItemGroups");
658 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
661 if ($form->checkInput()) {
663 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
664 $titles[$lang_id] = $form->getInput(
"title_" . $lang_id);
668 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
669 $this->ctrl->redirect($this,
"listNewItemGroups");
673 $form->setValuesByPost();
680 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
682 $this->ctrl->redirect($this,
"listNewItemGroups");
689 if (is_array(
$_POST[
"grp_order"])) {
692 $grp_pos_map = array();
694 $grp_pos_map[$item[
"id"]] = str_pad($item[
"pos"], 4,
"0", STR_PAD_LEFT);
701 foreach ($subitems as $obj_type) {
702 $old_pos =
$ilSetting->get(
"obj_add_new_pos_" . $obj_type);
703 if (strlen($old_pos) == 8) {
704 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
705 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $new_pos);
711 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
713 $this->ctrl->redirect($this,
"listNewItemGroups");
718 if (!is_array(
$_POST[
"grp_id"])) {
726 $cgui->setHeaderText($this->lng->txt(
"rep_new_item_group_delete_sure"));
728 $cgui->setFormAction($this->ctrl->getFormAction($this));
729 $cgui->setCancel($this->lng->txt(
"cancel"),
"listNewItemGroups");
730 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteNewItemGroup");
734 foreach (
$_POST[
"grp_id"] as $grp_id) {
735 $cgui->addItem(
"grp_id[]", $grp_id, $groups[$grp_id][
"title"]);
738 $this->tpl->setContent($cgui->getHTML());
743 if (!is_array(
$_POST[
"grp_id"])) {
747 foreach (
$_POST[
"grp_id"] as $grp_id) {
751 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
752 $this->ctrl->redirect($this,
"listNewItemGroups");
759 switch ($a_form_id) {
762 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
765 return array(array(
"view", $fields));
775 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)
setModuleSubTabs($a_active)
addNewItemGroupSeparator()
setInfo($a_info)
Set Info.
static getNewItemGroupSubItems()
prepareOutput($a_show_subobjects=true)
prepare output
static deleteNewItemGroup($a_id)
addSubItem($a_item)
Add Subitem.
Class ilObjectGUI Basic methods of all Output classes.
__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)
const SET_EXPORT_DISABLED
static _isActive()
Returns true, if change event tracking is active.
Export limitation checker.
__construct(Container $dic, ilPlugin $plugin)
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.