5 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
6 require_once
"class.ilDataCollectionCache.php";
32 $this->parent_obj = $a_parent_obj;
34 $this->
setId(
"dcl_field_list");
36 $this->
addColumn($lng->txt(
"dcl_order"), null,
"30px");
37 $this->
addColumn($lng->txt(
"dcl_title"), null,
"auto");
38 $this->
addColumn($lng->txt(
"dcl_visible"), null,
"30px");
39 $this->
addColumn($lng->txt(
"dcl_filter"), null,
"30px");
40 $this->
addColumn($lng->txt(
"dcl_locked"), null,
"30px");
43 $this->
addColumn($lng->txt(
"dcl_description"), null,
"auto");
44 $this->
addColumn($lng->txt(
"dcl_field_datatype"), null,
"auto");
45 $this->
addColumn($lng->txt(
"dcl_required"), null,
"auto");
46 $this->
addColumn($lng->txt(
"dcl_unique"), null,
"auto");
47 $this->
addColumn($lng->txt(
"actions"), null,
"30px");
49 $ilCtrl->setParameterByClass(
"ildatacollectionfieldeditgui",
"table_id", $this->parent_obj->table_id);
50 $ilCtrl->setParameterByClass(
"ildatacollectionfieldlistgui",
"table_id", $this->parent_obj->table_id);
55 $this->
setFormAction($ilCtrl->getFormActionByClass(
"ildatacollectionfieldlistgui"));
75 $this->
setData($this->table->getFields());
77 require_once(
'./Modules/DataCollection/classes/class.ilDataCollectionDatatype.php');
79 $this->
setTitle($lng->txt(
"dcl_table_list_fields"));
81 $this->
setRowTemplate(
"tpl.field_list_row.html",
"Modules/DataCollection");
93 $this->tpl->setVariable(
'NAME',
"order[".$a_set->
getId().
"]");
94 $this->tpl->setVariable(
'VALUE', $this->order);
96 $this->tpl->setVariable(
"CHECKBOX_VISIBLE",
"visible[".$a_set->
getId().
"]");
99 $this->tpl->setVariable(
"CHECKBOX_VISIBLE_CHECKED",
"checked");
102 $this->tpl->setVariable(
"CHECKBOX_FILTERABLE",
"filterable[".$a_set->
getId().
"]");
105 $this->tpl->setVariable(
"CHECKBOX_FILTERABLE_CHECKED",
"checked");
110 $this->tpl->setVariable(
"CHECKBOX_NAME_LOCKED",
"locked[".$a_set->
getId().
"]");
113 $this->tpl->setVariable(
"CHECKBOX_CHECKED_LOCKED",
"checked");
118 $this->tpl->setVariable(
"NOT_LOCKED",
"-");
121 $this->order = $this->order + 10;
122 $this->tpl->setVariable(
"ORDER_NAME",
"order[".$a_set->
getId().
"]");
123 $this->tpl->setVariable(
"ORDER_VALUE", $this->order);
126 $this->tpl->setVariable(
'TITLE', $a_set->
getTitle());
150 $this->tpl->setVariable(
'REQUIRED', $required);
151 $this->tpl->setVariable(
'UNIQUE', $uniq);
155 $this->tpl->setVariable(
'NO_REQUIRED',
"-");
156 $this->tpl->setVariable(
'NO_UNIQUE',
"-");
159 $ilCtrl->setParameterByClass(
"ildatacollectionfieldeditgui",
"field_id", $a_set->
getId());
163 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
165 $alist->setId($a_set->
getId());
166 $alist->setListTitle($lng->txt(
"actions"));
168 if($this->table->hasPermissionToFields($this->parent_obj->parent_obj->ref_id))
170 $alist->addItem($lng->txt(
'edit'),
'edit', $ilCtrl->getLinkTargetByClass(
"ildatacollectionfieldeditgui",
'edit'));
171 $alist->addItem($lng->txt(
'delete'),
'delete', $ilCtrl->getLinkTargetByClass(
"ildatacollectionfieldeditgui",
'confirmDelete'));
174 $this->tpl->setVariable(
"ACTIONS", $alist->getHTML());