2 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
3 include_once(
'./Modules/DataCollection/classes/TableView/class.ilDclTableViewFieldSetting.php');
4 include_once(
'./Modules/DataCollection/classes/Fields/class.ilDclFieldFactory.php');
20 parent::__construct($a_parent_obj);
22 $this->
setId(
'dcl_tableviews');
23 $this->
setTitle(
$lng->txt(
'dcl_tableview_fieldsettings'));
25 $this->
addColumn(
$lng->txt(
'dcl_field_visible'), NULL,
'auto');
28 $this->
addColumn(
$lng->txt(
'dcl_filter_changeable'), NULL,
'auto');
31 $ilCtrl->saveParameter($this,
'tableview_id');
38 $this->
setRowTemplate(
'tpl.tableview_fields_row.html',
'Modules/DataCollection');
47 $this->
parseData($a_parent_obj->tableview->getFieldSettings());
52 if (!$this->parent_obj->table->getPublicCommentsEnabled()) {
53 foreach (
$data as $key => $rec) {
54 if ($rec->getField() ==
'comments') {
67 $field = $a_set->getFieldObject();
68 if ($field->getId() ==
'comments' && !$this->parent_obj->table->getPublicCommentsEnabled()) {
72 $this->tpl->setVariable(
'FIELD_TITLE', $field->getTitle());
73 $this->tpl->setVariable(
'ID', $a_set->getId());
74 $this->tpl->setVariable(
'FIELD_ID', $a_set->getField());
75 $this->tpl->setVariable(
'VISIBLE', $a_set->isVisible() ?
'checked' :
'');
76 if ($field->allowFilterInListView())
78 $this->tpl->setVariable(
'IN_FILTER', $a_set->isInFilter() ?
'checked' :
'');
79 $this->tpl->setVariable(
'FILTER_VALUE', $this->
getStandardFilterHTML($field, $a_set->getFilterValue()));
80 $this->tpl->setVariable(
'FILTER_CHANGEABLE', $a_set->isFilterChangeable() ?
'checked' :
'');
84 $this->tpl->setVariable(
'NO_FILTER',
'');
98 $field_representation->addFilterInputFieldToTable($this);
99 $filter = end($this->filters);
100 $this->filters = null;
101 $filter->setValueByArray($value);
102 return $filter->render();
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
Class ilDclBaseFieldModel.
setExternalSorting($a_val)
Set external sorting.
Class ilDclTableViewEditGUI.
setShowTemplates($a_value)
Toggle templates.
static getFieldRepresentationInstance(ilDclBaseFieldModel $field)
Returns FieldRepresentation from BaseFieldModel.
setExternalSegmentation($a_val)
Set external segmentation.
Class ilDclTableViewEditFieldsTableGUI.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
__construct(ilDclTableViewEditGUI $a_parent_obj)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
getStandardFilterHTML(ilDclBaseFieldModel $field, $value)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.