4 require_once (
"./Modules/DataCollection/classes/class.ilDataCollectionField.php");
5 require_once (
"./Modules/DataCollection/classes/class.ilDataCollectionTable.php");
6 include_once(
"class.ilDataCollectionDatatype.php");
7 require_once
"class.ilDataCollectionCache.php";
34 $this->main_table_id = $a_parent_obj->object->getMainTableId();
35 $this->table_id = $table_id;
36 $this->parent_obj = $a_parent_obj;
37 $this->obj_id = $a_parent_obj->obj_id;
40 $ilCtrl->redirectByClass(
'ildatacollectionrecordlistgui',
'listRecords');
52 $cmd = $ilCtrl->getCmd();
69 $fields = &$table->getFields();
71 foreach($fields as &$field)
73 $field->setVisible(
$_POST[
'visible'][$field->getId()] ==
"on");
74 $field->setEditable(
$_POST[
'editable'][$field->getId()] ==
"on");
75 $field->setFilterable(
$_POST[
'filterable'][$field->getId()] ==
"on");
76 $field->setLocked(
$_POST[
'locked'][$field->getId()] ==
"on");
77 $field->setExportable(
$_POST[
'exportable'][$field->getId()] ==
"on");
78 $field->setOrder(
$_POST[
'order'][$field->getId()]);
81 $table->buildOrderFields();
94 require_once(
"./Modules/DataCollection/classes/class.ilDataCollectionTable.php");
95 $tables = $this->parent_obj->object->getTables();
97 foreach($tables as $table)
99 $options[$table->getId()] = $table->getTitle();
101 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
103 $table_selection->setOptions(
$options);
104 $table_selection->setValue($this->table_id);
106 $ilToolbar->setFormAction($ilCtrl->getFormActionByClass(
"ilDataCollectionFieldListGUI",
"doTableSwitch"));
107 $ilToolbar->addText($lng->txt(
"dcl_table"));
108 $ilToolbar->addInputItem($table_selection);
109 $ilToolbar->addFormButton($lng->txt(
'change'),
'doTableSwitch');
110 $ilToolbar->addSeparator();
111 $ilToolbar->addButton($lng->txt(
"dcl_add_new_table"), $ilCtrl->getLinkTargetByClass(
"ildatacollectiontableeditgui",
"create"));
112 $ilToolbar->addSeparator();
113 $ilCtrl->setParameterByClass(
"ildatacollectiontableeditgui",
"table_id", $this->table_id);
114 $ilToolbar->addButton($lng->txt(
"dcl_table_settings"), $ilCtrl->getLinkTargetByClass(
"ildatacollectiontableeditgui",
"edit"));
115 $ilToolbar->addButton($lng->txt(
"dcl_delete_table"), $ilCtrl->getLinkTargetByClass(
"ildatacollectiontableeditgui",
"confirmDelete"));
116 $ilToolbar->addButton($lng->txt(
"dcl_add_new_field"), $ilCtrl->getLinkTargetByClass(
"ildatacollectionfieldeditgui",
"create"));
121 require_once(
'./Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php');
124 $tpl->setContent($list->getHTML());
135 $ilCtrl->setParameterByClass(
"ilObjDataCollectionGUI",
"table_id",
$_POST[
'table_id']);
136 $ilCtrl->redirectByClass(
"ilDataCollectionFieldListGUI",
"listFields");
144 $ref_id = $this->parent_obj->getDataCollectionObject()->getRefId();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilDataCollectionFieldListTableGUI.
executeCommand()
execute command
Class ilDataCollectionFieldListGUI.
Class ilObjDataCollectionGUI.
if(!is_array($argv)) $options
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct(ilObjDataCollectionGUI $a_parent_obj, $table_id)
Constructor.
static _hasWriteAccess($ref)
static getTableCache($table_id=0)