28 $ilCtrl = $DIC[
'ilCtrl'];
33 $this->
ctrl = $ilCtrl;
36 $this->
setId(
'dcl_table_list');
40 $this->
addColumn(
$lng->
txt(
'dcl_visible'),
"",
'250px',
false,
'', $this->
lng->txt(
'dcl_visible_desc'));
47 $this->
lng->txt(
'dcl_public_comments_desc')
54 $this->
setFormAction($ilCtrl->getFormActionByClass(
'ildcltablelistgui'));
73 $this->
setRowTemplate(
'tpl.table_list_row.html',
'Modules/DataCollection');
74 $this->
setStyle(
'table', $this->
getStyle(
'table') .
' ' .
'dcl_record_list');
76 $tables = $this->parent_obj->getDataCollectionObject()->getTables();
103 if ($this->form_multipart) {
104 $this->tpl->touchBlock(
"form_multipart_bl");
108 $this->tpl->touchBlock(
"pdfs");
111 $this->tpl->setCurrentBlock(
"tbl_form_header");
112 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction() . $hash);
113 $this->tpl->setVariable(
"FORMNAME", $this->
getFormName());
114 $this->tpl->parseCurrentBlock();
118 $this->tpl->touchBlock(
"tbl_form_footer");
122 if (!$this->enabled[
'content']) {
132 $this->
setFooter(
"tblfooter", $this->
lng->txt(
"previous"), $this->
lng->txt(
"next"));
158 $this->tpl->addBlockFile(
162 $this->row_template_dir
165 foreach ($data as $set) {
166 $this->tpl->setCurrentBlock(
"tbl_content");
167 $this->css_row = ($this->css_row !==
"tblrow1")
170 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
173 $this->tpl->setCurrentBlock(
"tbl_content");
174 $this->tpl->parseCurrentBlock();
182 $this->css_row = ($this->css_row !==
"tblrow1")
186 $this->tpl->setCurrentBlock(
"tbl_no_entries");
187 $this->tpl->setVariable(
'TBL_NO_ENTRY_CSS_ROW', $this->css_row);
188 $this->tpl->setVariable(
'TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
189 $this->tpl->setVariable(
'TBL_NO_ENTRY_TEXT', trim($no_items_text));
190 $this->tpl->parseCurrentBlock();
208 $this->tpl->setVariable(
"ID", $a_set->
getId());
209 $this->tpl->setVariable(
"ORDER_NAME",
"order[{$a_set->getId()}]");
210 $this->tpl->setVariable(
"ORDER_VALUE", $a_set->
getOrder());
211 $this->tpl->setVariable(
"TITLE", $a_set->
getTitle());
213 $this->
ctrl->setParameterByClass(
'ildclfieldlistgui',
'table_id', $a_set->
getId());
214 $this->tpl->setVariable(
"TITLE_LINK", $this->
ctrl->getLinkTargetByClass(
'ildclfieldlistgui'));
216 $this->tpl->setVariable(
"CHECKBOX_NAME_VISIBLE",
'visible[' . $a_set->
getId() .
']');
218 $this->tpl->setVariable(
"CHECKBOX_CHECKED_VISIBLE",
'checked');
220 $this->tpl->setVariable(
"CHECKBOX_NAME_COMMENTS",
'comments[' . $a_set->
getId() .
']');
222 $this->tpl->setVariable(
"CHECKBOX_CHECKED_COMMENTS",
'checked');
231 $alist->setListTitle($this->
lng->txt(
'actions'));
232 $this->
ctrl->setParameterByClass(
'ildclfieldlistgui',
'table_id', $id);
233 $this->
ctrl->setParameterByClass(
'ildcltableviewgui',
'table_id', $id);
234 $this->
ctrl->setParameterByClass(
'ildcltableeditgui',
'table_id', $id);
236 $this->
lng->txt(
'settings'),
238 $this->
ctrl->getLinkTargetByClass(
'ildcltableeditgui',
'edit')
241 $this->
lng->txt(
'dcl_list_fields'),
243 $this->
ctrl->getLinkTargetByClass(
'ildclfieldlistgui',
'listFields')
245 $alist->addItem($this->
lng->txt(
'dcl_tableviews'),
'', $this->
ctrl->getLinkTargetByClass(
'ildcltableviewgui'));
247 $this->
lng->txt(
'delete'),
249 $this->
ctrl->getLinkTargetByClass(
'ildcltableeditgui',
'confirmDelete')
252 return $alist->getHTML();
numericOrdering(string $a_field)
Should this field be sorted numeric?
prepareOutput()
Anything that must be done before HTML is generated.
setTopCommands(bool $a_val)
getPublicCommentsEnabled()
getStyle(string $a_element)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
fillRowFromObject(ilDclTable $a_set)
setEnableTitle(bool $a_enabletitle)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setShowTemplates(bool $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormName(string $a_name="")
exportData(int $format, bool $send=false)
Export and optionally send current table data.
setStyle(string $a_element, string $a_style)
setExternalSorting(bool $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
getExternalSegmentation()
setDefaultOrderDirection(string $a_defaultorderdirection)
getPreventDoubleSubmission()
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(ilDclTableListGUI $parent_obj)
ilDclTableListTableGUI constructor.
setFooter(string $a_style, string $a_previous="", string $a_next="")
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
static setUseRelativeDates(bool $a_status)
set use relative dates
addMultiCommand(string $a_cmd, string $a_text)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
setExternalSegmentation(bool $a_val)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)