35 $ilCtrl = $DIC[
'ilCtrl'];
39 $this->parent_obj = $a_parent_obj;
42 $this->
setId(
'dcl_field_list');
48 $this->
addColumn(
$lng->txt(
'dcl_field_datatype'), null,
'auto');
52 if (count($this->table->getRecordFields())) {
57 $ilCtrl->setParameterByClass(
'ildclfieldeditgui',
'table_id', $this->parent_obj->table_id);
58 $ilCtrl->setParameterByClass(
'ildclfieldlistgui',
'table_id', $this->parent_obj->table_id);
60 $this->
setFormAction($ilCtrl->getFormActionByClass(
'ildclfieldlistgui'));
79 $this->
setRowTemplate(
'tpl.field_list_row.html',
'Modules/DataCollection');
80 $this->
setStyle(
'table', $this->
getStyle(
'table') .
' ' .
'dcl_record_list');
82 $this->
setData($this->table->getFields());
93 $ilCtrl = $DIC[
'ilCtrl'];
95 if (!$a_set->isStandardField()) {
96 $this->tpl->setVariable(
'FIELD_ID', $a_set->getId());
99 $this->tpl->setVariable(
'NAME',
'order[' . $a_set->getId() .
']');
100 $this->tpl->setVariable(
'VALUE', $this->order);
103 $show_exportable =
true;
105 if ($a_set->getId() ==
'comments') {
106 $show_exportable =
false;
109 if ($show_exportable) {
110 $this->tpl->setVariable(
'CHECKBOX_EXPORTABLE',
'exportable[' . $a_set->getId() .
']');
111 if ($a_set->getExportable()) {
112 $this->tpl->setVariable(
'CHECKBOX_EXPORTABLE_CHECKED',
'checked');
115 $this->tpl->setVariable(
'NO_FILTER_EXPORTABLE',
'');
118 $this->order = $this->order + 10;
119 $this->tpl->setVariable(
'ORDER_NAME',
'order[' . $a_set->getId() .
']');
120 $this->tpl->setVariable(
'ORDER_VALUE', $this->order);
122 $this->tpl->setVariable(
'TITLE', $a_set->getTitle());
123 $this->tpl->setVariable(
'DESCRIPTION', $a_set->getDescription());
124 $this->tpl->setVariable(
'DATATYPE', $a_set->getDatatypeTitle());
126 if (!$a_set->isStandardField()) {
127 switch ($a_set->isUnique()) {
135 $this->tpl->setVariable(
'UNIQUE', $uniq);
137 $this->tpl->setVariable(
'NO_UNIQUE',
'');
140 $ilCtrl->setParameterByClass(
'ildclfieldeditgui',
'field_id', $a_set->getId());
142 if (!$a_set->isStandardField()) {
144 $alist->setId($a_set->getId());
145 $alist->setListTitle(
$lng->txt(
'actions'));
148 $alist->addItem(
$lng->txt(
'edit'),
'edit', $ilCtrl->getLinkTargetByClass(
'ildclfieldeditgui',
'edit'));
149 $alist->addItem(
$lng->txt(
'delete'),
'delete', $ilCtrl->getLinkTargetByClass(
'ildclfieldeditgui',
'confirmDelete'));
152 $this->tpl->setVariable(
'ACTIONS', $alist->getHTML());
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setExternalSorting($a_val)
Set external sorting.
setStyle($a_element, $a_style)
setShowTemplates($a_value)
Toggle templates.
setExternalSegmentation($a_val)
Set external segmentation.
static getTableCache($table_id=0)
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)
static hasAccessToFields($ref_id, $table_id)
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
Class ilDclFieldListTableGUI.
__construct(ilDclFieldListGUI $a_parent_obj, $a_parent_cmd, $table_id)
setFormName($a_formname="")
Set Form name.
__construct(Container $dic, ilPlugin $plugin)
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.