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);
200 $cb->
setInfo($this->lng->txt(
"enable_trash_info"));
202 $cb->setChecked(
true);
207 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
208 $this->lng->loadLanguageModule(
"trac");
209 $event =
new ilCheckboxInputGUI($this->lng->txt(
'trac_show_repository_views'),
'change_event_tracking');
210 $event->
setInfo($this->lng->txt(
"trac_show_repository_views_info"));
212 $form->addItem($event);
215 include_once
"Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
226 $lists->setTitle($this->lng->txt(
"rep_object_lists"));
227 $form->addItem($lists);
229 $sdesc =
new ilCheckboxInputGUI($this->lng->txt(
"adm_rep_shorten_description"),
"rep_shorten_description");
230 $sdesc->
setInfo($this->lng->txt(
"adm_rep_shorten_description_info"));
231 $sdesc->setChecked(
$ilSetting->get(
"rep_shorten_description"));
232 $form->addItem($sdesc);
234 $sdesclen =
new ilNumberInputGUI($this->lng->txt(
"adm_rep_shorten_description_length"),
"rep_shorten_description_length");
236 $sdesclen->setSize(3);
237 $sdesc->addSubItem($sdesclen);
240 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adm_item_cmd_asynch"),
"item_cmd_asynch");
241 $cb->
setInfo($this->lng->txt(
"adm_item_cmd_asynch_info"));
242 $cb->setChecked(
$ilSetting->get(
"item_cmd_asynch"));
246 $pl =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists'),
'comments_tagging_in_lists');
248 $pl->setChecked(
$ilSetting->get(
'comments_tagging_in_lists'));
251 $pltags =
new ilCheckboxInputGUI($this->lng->txt(
'adm_show_comments_tagging_in_lists_tags'),
'comments_tagging_in_lists_tags');
253 $pltags->setChecked(
$ilSetting->get(
'comments_tagging_in_lists_tags'));
254 $pl->addSubItem($pltags);
256 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
257 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
268 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
269 $this->ctrl->redirect($this,
"view");
273 if (
$form->checkInput()) {
277 if (
$_POST[
"tree_pres"] ==
"") {
278 $_POST[
"rep_tree_limit_grp_crs"] =
"";
280 if (
$_POST[
"rep_tree_limit_grp_crs"] && !
$ilSetting->get(
"rep_tree_limit_grp_crs")) {
281 $_POST[
"rep_tree_synchronize"] =
true;
282 } elseif (!
$_POST[
"rep_tree_synchronize"] &&
$ilSetting->get(
"rep_tree_synchronize")) {
283 $_POST[
"rep_tree_limit_grp_crs"] =
false;
285 $ilSetting->set(
"rep_tree_limit_grp_crs",
$_POST[
"rep_tree_limit_grp_crs"]);
292 $ilSetting->set(
"rep_shorten_description",
$form->getInput(
'rep_shorten_description'));
293 $ilSetting->set(
"rep_shorten_description_length", (
int)
$form->getInput(
'rep_shorten_description_length'));
295 $ilSetting->set(
'comments_tagging_in_lists', (
int) $_POST[
'comments_tagging_in_lists']);
296 $ilSetting->set(
'comments_tagging_in_lists_tags', (
int) $_POST[
'comments_tagging_in_lists_tags']);
298 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
299 if (
$form->getInput(
'change_event_tracking')) {
306 $this->ctrl->redirect($this,
"view");
309 $form->setValuesByPost();
315 $this->tabs_gui->activateTab(
"icons");
321 $this->tpl->setContent($a_form->getHTML());
329 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
330 include_once
"Services/Form/classes/class.ilCombinationInputGUI.php";
332 $form->setTitle($this->lng->txt(
"rep_custom_icons"));
333 $form->setFormAction($this->ctrl->getFormAction($this,
'saveCustomIcons'));
336 $cb->
setInfo($this->lng->txt(
"enable_custom_icons_info"));
337 $cb->setChecked(
$ilSetting->get(
"custom_icons"));
340 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
341 $form->addCommandButton(
'saveCustomIcons', $this->lng->txt(
'save'));
352 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
353 $this->ctrl->redirect($this,
"customIcons");
357 if (
$form->checkInput()) {
358 $ilSetting->set(
"custom_icons", (
int)
$form->getInput(
"custom_icons"));
360 $this->ctrl->redirect($this,
"customIcons");
363 $form->setValuesByPost();
369 $this->tabs_gui->activateTab(
'modules');
371 $this->tabs_gui->addSubTab(
373 $this->lng->txt(
"rep_new_item_menu"),
374 $this->ctrl->getLinkTarget($this,
"listModules")
377 $this->tabs_gui->addSubTab(
379 $this->lng->txt(
"rep_new_item_groups"),
380 $this->ctrl->getLinkTarget($this,
"listNewItemGroups")
383 $this->tabs_gui->activateSubTab($a_active);
392 $has_write = $ilAccess->checkAccess(
'write',
'', $this->
object->getRefId());
394 include_once(
"./Services/Repository/classes/class.ilModulesTableGUI.php");
397 $this->tpl->setContent($comp_table->getHTML());
407 if (!is_array(
$_POST[
"obj_grp"]) ||
408 !is_array(
$_POST[
"obj_pos"]) ||
409 !$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
410 $ilCtrl->redirect($this,
"listModules");
413 $grp_pos_map =
array(0 => 9999);
414 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
416 $grp_pos_map[$item[
"id"]] = $item[
"pos"];
419 $type_pos_map =
array();
420 foreach (
$_POST[
"obj_pos"] as $obj_type => $pos) {
421 $grp_id = (int)
$_POST[
"obj_grp"][$obj_type];
422 $type_pos_map[$grp_id][$obj_type] = $pos;
425 $ilSetting->set(
"obj_dis_creation_" . $obj_type, !(
int)
$_POST[
"obj_enbl_creation"][$obj_type]);
428 foreach ($type_pos_map as $grp_id => $obj_types) {
429 $grp_pos = str_pad($grp_pos_map[$grp_id], 4,
"0", STR_PAD_LEFT);
433 foreach (array_keys($obj_types) as $obj_type) {
435 $type_pos = $grp_pos . str_pad($pos, 4,
"0", STR_PAD_LEFT);
436 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $type_pos);
437 $ilSetting->set(
"obj_add_new_pos_grp_" . $obj_type, $grp_id);
453 $ilCtrl->redirect($this,
"listModules");
463 $has_write = $ilAccess->checkAccess(
'write',
'', $this->
object->getRefId());
466 $ilToolbar->addButton(
467 $this->lng->txt(
"rep_new_item_group_add"),
468 $this->ctrl->getLinkTarget($this,
"addNewItemGroup")
471 $ilToolbar->addButton(
472 $this->lng->txt(
"rep_new_item_group_add_separator"),
473 $this->ctrl->getLinkTarget($this,
"addNewItemGroupSeparator")
477 include_once(
"./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
480 $this->tpl->setContent($grp_table->getHTML());
487 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
490 $this->lng->loadLanguageModule(
"meta");
491 $def_lng = $this->lng->getDefaultLanguage();
494 $title->setInfo($this->lng->txt(
"meta_l_" . $def_lng) .
495 " (" . $this->lng->txt(
"default_language") .
")");
496 $title->setRequired(
true);
499 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
500 if ($lang_id != $def_lng) {
502 $title->setInfo($this->lng->txt(
"meta_l_" . $lang_id));
508 $form->setTitle($this->lng->txt(
"rep_new_item_group_add"));
509 $form->setFormAction($this->ctrl->getFormAction($this,
"saveNewItemGroup"));
511 $form->addCommandButton(
"saveNewItemGroup", $this->lng->txt(
"save"));
513 $form->setTitle($this->lng->txt(
"rep_new_item_group_edit"));
514 $form->setFormAction($this->ctrl->getFormAction($this,
"updateNewItemGroup"));
516 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
518 $grp = $grp[$a_grp_id];
520 foreach ($grp[
"titles"] as
$id => $value) {
521 $field =
$form->getItemByPostVar(
"title_" .
$id);
523 $field->setValue($value);
527 $form->addCommandButton(
"updateNewItemGroup", $this->lng->txt(
"save"));
529 $form->addCommandButton(
"listNewItemGroups", $this->lng->txt(
"cancel"));
540 $this->tpl->setContent($a_form->getHTML());
546 if (
$form->checkInput()) {
548 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
549 $titles[$lang_id] =
$form->getInput(
"title_" . $lang_id);
552 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
555 $this->ctrl->redirect($this,
"listNewItemGroups");
559 $form->setValuesByPost();
565 $grp_id = (int)
$_GET[
"grp_id"];
567 $this->ctrl->redirect($this,
"listNewItemGroups");
571 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
575 $this->tpl->setContent($a_form->getHTML());
580 $grp_id = (int)
$_GET[
"grp_id"];
582 $this->ctrl->redirect($this,
"listNewItemGroups");
585 $this->ctrl->setParameter($this,
"grp_id", $grp_id);
588 if (
$form->checkInput()) {
590 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
591 $titles[$lang_id] =
$form->getInput(
"title_" . $lang_id);
594 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
597 $this->ctrl->redirect($this,
"listNewItemGroups");
601 $form->setValuesByPost();
607 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
611 $this->ctrl->redirect($this,
"listNewItemGroups");
618 if (is_array(
$_POST[
"grp_order"])) {
619 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
622 $grp_pos_map =
array();
623 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
625 $grp_pos_map[$item[
"id"]] = str_pad($item[
"pos"], 4,
"0", STR_PAD_LEFT);
632 foreach ($subitems as $obj_type) {
633 $old_pos =
$ilSetting->get(
"obj_add_new_pos_" . $obj_type);
634 if (strlen($old_pos) == 8) {
635 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
636 $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $new_pos);
644 $this->ctrl->redirect($this,
"listNewItemGroups");
649 if (!is_array(
$_POST[
"grp_id"])) {
656 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
658 $cgui->setHeaderText($this->lng->txt(
"rep_new_item_group_delete_sure"));
660 $cgui->setFormAction($this->ctrl->getFormAction($this));
661 $cgui->setCancel($this->lng->txt(
"cancel"),
"listNewItemGroups");
662 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteNewItemGroup");
664 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
667 foreach (
$_POST[
"grp_id"] as $grp_id) {
668 $cgui->addItem(
"grp_id[]", $grp_id, $groups[$grp_id][
"title"]);
671 $this->tpl->setContent($cgui->getHTML());
676 if (!is_array(
$_POST[
"grp_id"])) {
680 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
681 foreach (
$_POST[
"grp_id"] as $grp_id) {
686 $this->ctrl->redirect($this,
"listNewItemGroups");
693 switch ($a_form_id) {
696 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)
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
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)
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Confirmation screen class.