33 $ilCtrl = $DIC[
'ilCtrl'];
35 $this->factory = $DIC->ui()->factory();
36 $this->renderer = $DIC->ui()->renderer();
40 $this->parent_obj = $a_parent_obj;
42 $this->table->showInvalidFields(
true);
44 $this->
setId(
'dcl_field_list');
54 if (count($this->table->getRecordFields())) {
59 $ilCtrl->setParameterByClass(
'ildclfieldeditgui',
'table_id', $this->parent_obj->getTableId());
60 $ilCtrl->setParameterByClass(
'ildclfieldlistgui',
'table_id', $this->parent_obj->getTableId());
62 $this->
setFormAction($ilCtrl->getFormActionByClass(
'ildclfieldlistgui'));
81 $this->
setRowTemplate(
'tpl.field_list_row.html',
'Modules/DataCollection');
82 $this->
setStyle(
'table', $this->
getStyle(
'table') .
' ' .
'dcl_record_list');
84 $this->
setData($this->table->getFields());
110 if ($this->form_multipart) {
111 $this->tpl->touchBlock(
"form_multipart_bl");
115 $this->tpl->touchBlock(
"pdfs");
118 $this->tpl->setCurrentBlock(
"tbl_form_header");
119 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction() . $hash);
120 $this->tpl->setVariable(
"FORMNAME", $this->
getFormName());
121 $this->tpl->parseCurrentBlock();
125 $this->tpl->touchBlock(
"tbl_form_footer");
129 if (!$this->enabled[
'content']) {
139 $this->
setFooter(
"tblfooter", $this->
lng->txt(
"previous"), $this->
lng->txt(
"next"));
165 $this->tpl->addBlockFile(
169 $this->row_template_dir
172 foreach ($data as $set) {
173 $this->tpl->setCurrentBlock(
"tbl_content");
174 $this->css_row = ($this->css_row !==
"tblrow1")
177 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
180 $this->tpl->setCurrentBlock(
"tbl_content");
181 $this->tpl->parseCurrentBlock();
189 $this->css_row = ($this->css_row !==
"tblrow1")
193 $this->tpl->setCurrentBlock(
"tbl_no_entries");
194 $this->tpl->setVariable(
'TBL_NO_ENTRY_CSS_ROW', $this->css_row);
195 $this->tpl->setVariable(
'TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
196 $this->tpl->setVariable(
'TBL_NO_ENTRY_TEXT', trim($no_items_text));
197 $this->tpl->parseCurrentBlock();
217 $ilCtrl = $DIC[
'ilCtrl'];
220 $this->tpl->setVariable(
'FIELD_ID', $a_set->
getId());
223 $this->tpl->setVariable(
'NAME',
'order[' . $a_set->
getId() .
']');
224 $this->tpl->setVariable(
'VALUE', $this->order);
227 $show_exportable =
true;
229 if ($a_set->
getId() ==
'comments') {
230 $show_exportable =
false;
233 if ($show_exportable) {
234 $this->tpl->setVariable(
'CHECKBOX_EXPORTABLE',
'exportable[' . $a_set->
getId() .
']');
236 $this->tpl->setVariable(
'CHECKBOX_EXPORTABLE_CHECKED',
'checked');
239 $this->tpl->setVariable(
'NO_FILTER_EXPORTABLE',
'');
242 $this->order = $this->order + 10;
243 $this->tpl->setVariable(
'ORDER_NAME',
'order[' . $a_set->
getId() .
']');
244 $this->tpl->setVariable(
'ORDER_VALUE', $this->order);
246 $this->tpl->setVariable(
'TITLE', $a_set->
getTitle());
259 $this->tpl->setVariable(
'ICON_UNIQUE', $this->renderer->render(
$icon));
261 $this->tpl->setVariable(
'NO_UNIQUE',
'');
264 $ilCtrl->setParameterByClass(
'ildclfieldeditgui',
'field_id', $a_set->
getId());
268 $alist->setId($a_set->
getId());
269 $alist->setListTitle(
$lng->
txt(
'actions'));
272 $this->parent_obj->getDataCollectionObject()->getRefId(),
273 $this->table->getId()
276 $alist->addItem(
$lng->
txt(
'edit'),
'edit', $ilCtrl->getLinkTargetByClass(
'ildclfieldeditgui',
'edit'));
281 $ilCtrl->getLinkTargetByClass(
'ildclfieldeditgui',
'confirmDelete')
285 $this->tpl->setVariable(
'ACTIONS', $alist->getHTML());
numericOrdering(string $a_field)
Should this field be sorted numeric?
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput()
Anything that must be done before HTML is generated.
setTopCommands(bool $a_val)
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)
setEnableTitle(bool $a_enabletitle)
ILIAS UI Factory $factory
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)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setShowTemplates(bool $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormName(string $a_name="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exportData(int $format, bool $send=false)
Export and optionally send current table data.
fillRowFromObject(ilDclBaseFieldModel $a_set)
setStyle(string $a_element, string $a_style)
static hasAccessToFields(int $ref_id, int $table_id)
setExternalSorting(bool $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
static getTableCache(int $table_id=null)
static getAllDatatype(bool $force=false)
Get all possible Datatypes.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
getExternalSegmentation()
ILIAS UI Renderer $renderer
setDefaultOrderDirection(string $a_defaultorderdirection)
getPreventDoubleSubmission()
getDescription()
Get description.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFooter(string $a_style, string $a_previous="", string $a_next="")
__construct(Container $dic, ilPlugin $plugin)
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)
__construct(ilDclFieldListGUI $a_parent_obj, string $a_parent_cmd, int $table_id)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
getDatatypeId()
Get datatype_id.
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)