19 declare(strict_types=1);
35 $this->ui_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');
46 $this->
addColumn($this->
lng->txt(
'dcl_order'),
'',
'30px');
47 $this->
addColumn($this->
lng->txt(
'dcl_fieldtitle'),
'',
'auto');
48 $this->
addColumn($this->
lng->txt(
'dcl_in_export'),
'',
'30px');
49 $this->
addColumn($this->
lng->txt(
'dcl_description'),
'',
'auto');
50 $this->
addColumn($this->
lng->txt(
'dcl_field_datatype'),
'',
'auto');
53 if (count($this->table->getRecordFields())) {
58 $this->
ctrl->setParameterByClass(
'ildclfieldeditgui',
'table_id', $this->parent_obj->getTableId());
59 $this->
ctrl->setParameterByClass(
'ildclfieldlistgui',
'table_id', $this->parent_obj->getTableId());
78 $this->
setTitle($this->table->getTitle());
79 $this->
setRowTemplate(
'tpl.field_list_row.html',
'components/ILIAS/DataCollection');
80 $this->
setStyle(
'table', $this->
getStyle(
'table') .
' ' .
'dcl_record_list');
82 $this->
setData($this->table->getFields());
105 if ($this->form_multipart) {
106 $this->tpl->touchBlock(
"form_multipart_bl");
110 $this->tpl->touchBlock(
"pdfs");
113 $this->tpl->setCurrentBlock(
"tbl_form_header");
114 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction() . $hash);
115 $this->tpl->setVariable(
"FORMNAME", $this->
getFormName());
116 $this->tpl->parseCurrentBlock();
120 $this->tpl->touchBlock(
"tbl_form_footer");
124 if (!$this->enabled[
'content']) {
134 $this->
setFooter(
"tblfooter", $this->
lng->txt(
"previous"), $this->
lng->txt(
"next"));
160 $this->tpl->addBlockFile(
164 $this->row_template_dir
167 foreach ($data as $set) {
168 $this->tpl->setCurrentBlock(
"tbl_content");
169 $this->css_row = ($this->css_row !==
"tblrow1")
172 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
175 $this->tpl->setCurrentBlock(
"tbl_content");
176 $this->tpl->parseCurrentBlock();
182 : $this->
lng->txt(
"no_items");
184 $this->css_row = ($this->css_row !==
"tblrow1")
188 $this->tpl->setCurrentBlock(
"tbl_no_entries");
189 $this->tpl->setVariable(
'TBL_NO_ENTRY_CSS_ROW', $this->css_row);
190 $this->tpl->setVariable(
'TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
191 $this->tpl->setVariable(
'TBL_NO_ENTRY_TEXT', trim($no_items_text));
192 $this->tpl->parseCurrentBlock();
211 $this->tpl->setVariable(
'FIELD_ID', $a_set->
getId());
214 $this->tpl->setVariable(
'NAME',
'order[' . $a_set->
getId() .
']');
215 $this->tpl->setVariable(
'VALUE', $this->order);
218 $show_exportable =
true;
220 if ($a_set->
getId() ==
'comments') {
221 $show_exportable =
false;
224 if ($show_exportable) {
225 $this->tpl->setVariable(
'CHECKBOX_EXPORTABLE',
'exportable[' . $a_set->
getId() .
']');
227 $this->tpl->setVariable(
'CHECKBOX_EXPORTABLE_CHECKED',
'checked');
230 $this->tpl->setVariable(
'NO_FILTER_EXPORTABLE');
233 $this->order = $this->order + 10;
234 $this->tpl->setVariable(
'ORDER_NAME',
'order[' . $a_set->
getId() .
']');
235 $this->tpl->setVariable(
'ORDER_VALUE', $this->order);
237 $this->tpl->setVariable(
'TITLE', $a_set->
getTitle());
241 $this->
ctrl->setParameterByClass(
'ildclfieldeditgui',
'field_id', $a_set->
getId());
245 $this->parent_obj->getDataCollectionObject()->getRefId(),
246 $this->table->getId()
248 $dropdown_items = [];
250 $dropdown_items[] = $this->ui_factory->link()->standard(
251 $this->
lng->txt(
'edit'),
252 $this->
ctrl->getLinkTargetByClass(ilDclFieldEditGUI::class,
'edit')
255 $dropdown_items[] = $this->ui_factory->link()->standard(
256 $this->
lng->txt(
'delete'),
257 $this->
ctrl->getLinkTargetByClass(ilDclFieldEditGUI::class,
'confirmDelete')
259 $dropdown = $this->ui_factory->dropdown()->standard($dropdown_items)->withLabel($this->
lng->txt(
'actions'));
261 $this->tpl->setVariable(
'ACTIONS', $this->
renderer->render($dropdown));
263 $this->tpl->setVariable(
'ACTIONS');
numericOrdering(string $a_field)
Should this field be sorted numeric?
static array static setUseRelativeDates(bool $a_status)
set use relative dates
prepareOutput()
Anything that must be done before HTML is generated.
setTopCommands(bool $a_val)
getStyle(string $a_element)
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setFormName(string $a_name="")
exportData(int $format, bool $send=false)
Export and optionally send current table data.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 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)
static getTableCache(?int $table_id=null)
getPreventDoubleSubmission()
getDescription()
Get description.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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)
ILIAS UI Factory $ui_factory
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)