5 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
6 require_once
"class.ilDataCollectionCache.php";
30 parent::__construct($a_parent_obj, $a_parent_cmd);
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");
41 $this->
addColumn($lng->txt(
"dcl_in_export"), null,
"30px");
42 $this->
addColumn($lng->txt(
"dcl_description"), null,
"auto");
43 $this->
addColumn($lng->txt(
"dcl_field_datatype"), null,
"auto");
44 $this->
addColumn($lng->txt(
"dcl_required"), null,
"auto");
45 $this->
addColumn($lng->txt(
"dcl_unique"), null,
"auto");
46 $this->
addColumn($lng->txt(
"actions"), null,
"30px");
48 $ilCtrl->setParameterByClass(
"ildatacollectionfieldeditgui",
"table_id", $this->parent_obj->table_id);
49 $ilCtrl->setParameterByClass(
"ildatacollectionfieldlistgui",
"table_id", $this->parent_obj->table_id);
51 $this->
setFormAction($ilCtrl->getFormActionByClass(
"ildatacollectionfieldlistgui"));
71 $this->
setData($this->table->getFields());
72 require_once(
'./Modules/DataCollection/classes/class.ilDataCollectionDatatype.php');
73 $this->
setTitle($lng->txt(
"dcl_table_list_fields"));
74 $this->
setRowTemplate(
"tpl.field_list_row.html",
"Modules/DataCollection");
75 $this->
setStyle(
'table', $this->
getStyle(
'table') .
' ' .
'dcl_record_list');
87 $this->tpl->setVariable(
'NAME',
"order[".$a_set->
getId().
"]");
88 $this->tpl->setVariable(
'VALUE', $this->order);
90 $this->tpl->setVariable(
"CHECKBOX_VISIBLE",
"visible[".$a_set->
getId().
"]");
93 $this->tpl->setVariable(
"CHECKBOX_VISIBLE_CHECKED",
"checked");
109 $this->tpl->setVariable(
"CHECKBOX_FILTERABLE",
"filterable[".$a_set->
getId().
"]");
112 $this->tpl->setVariable(
"CHECKBOX_FILTERABLE_CHECKED",
"checked");
117 $this->tpl->setVariable(
"NO_FILTER",
"");
120 $this->tpl->setVariable(
"CHECKBOX_EXPORTABLE",
"exportable[".$a_set->
getId().
"]");
123 $this->tpl->setVariable(
"CHECKBOX_EXPORTABLE_CHECKED",
"checked");
128 $this->tpl->setVariable(
"CHECKBOX_NAME_LOCKED",
"locked[".$a_set->
getId().
"]");
131 $this->tpl->setVariable(
"CHECKBOX_CHECKED_LOCKED",
"checked");
136 $this->tpl->setVariable(
"NOT_LOCKED",
"");
139 $this->order = $this->order + 10;
140 $this->tpl->setVariable(
"ORDER_NAME",
"order[".$a_set->
getId().
"]");
141 $this->tpl->setVariable(
"ORDER_VALUE", $this->order);
144 $this->tpl->setVariable(
'TITLE', $a_set->
getTitle());
168 $this->tpl->setVariable(
'REQUIRED', $required);
169 $this->tpl->setVariable(
'UNIQUE', $uniq);
173 $this->tpl->setVariable(
'NO_REQUIRED',
"");
174 $this->tpl->setVariable(
'NO_UNIQUE',
"");
177 $ilCtrl->setParameterByClass(
"ildatacollectionfieldeditgui",
"field_id", $a_set->
getId());
181 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
183 $alist->setId($a_set->
getId());
184 $alist->setListTitle($lng->txt(
"actions"));
186 if($this->table->hasPermissionToFields($this->parent_obj->parent_obj->ref_id))
188 $alist->addItem($lng->txt(
'edit'),
'edit', $ilCtrl->getLinkTargetByClass(
"ildatacollectionfieldeditgui",
'edit'));
189 $alist->addItem($lng->txt(
'delete'),
'delete', $ilCtrl->getLinkTargetByClass(
"ildatacollectionfieldeditgui",
'confirmDelete'));
192 $this->tpl->setVariable(
"ACTIONS", $alist->getHTML());
setFormName($a_formname)
Set Form name.
setExternalSorting($a_val)
Set external sorting.
setStyle($a_element, $a_style)
setShowTemplates($a_value)
Toggle templates.
getDatatypeId()
Get datatype_id.
Class ilDataCollectionFieldListTableGUI.
setExternalSegmentation($a_val)
Set external segmentation.
Class ilDataCollectionFieldListGUI.
getRequired()
Get Required Required.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getFieldCache($field_id=0)
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="")
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Class ilDataCollectionField.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action)
Set Form action parameter.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
fillRow(ilDataCollectionField $a_set)
fill row
setEnableTitle($a_enabletitle)
Set Enable Title.
const INPUTFORMAT_REFERENCE
static getTableCache($table_id=0)
getDescription()
Get description.
__construct(ilDataCollectionFieldListGUI $a_parent_obj, $a_parent_cmd, $table_id)