33 $this->
setId(
'dcl_tableviews');
39 $ilCtrl->saveParameter($this,
'tableview_id');
40 $this->
setFormAction($ilCtrl->getFormActionByClass(
'ildclcreateviewdefinitiongui'));
46 $this->
setRowTemplate(
'tpl.tableview_create_view.html',
'Modules/DataCollection');
55 $this->
parseData($a_parent_obj->tableview->getFieldSettings());
83 if ($this->form_multipart) {
84 $this->tpl->touchBlock(
"form_multipart_bl");
88 $this->tpl->touchBlock(
"pdfs");
91 $this->tpl->setCurrentBlock(
"tbl_form_header");
92 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction() . $hash);
93 $this->tpl->setVariable(
"FORMNAME", $this->
getFormName());
94 $this->tpl->parseCurrentBlock();
98 $this->tpl->touchBlock(
"tbl_form_footer");
101 if (!$this->enabled[
'content']) {
108 $this->
setFooter(
"tblfooter", $this->
lng->txt(
"previous"), $this->
lng->txt(
"next"));
132 $this->tpl->addBlockFile(
136 $this->row_template_dir
138 foreach ($data as $set) {
139 $this->tpl->setCurrentBlock(
"tbl_content");
140 $this->css_row = ($this->css_row !==
"tblrow1")
143 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
144 $this->fillRowFromObject($set);
145 $this->tpl->setCurrentBlock(
"tbl_content");
146 $this->tpl->parseCurrentBlock();
153 $this->css_row = ($this->css_row !==
"tblrow1")
156 $this->tpl->setCurrentBlock(
"tbl_no_entries");
157 $this->tpl->setVariable(
'TBL_NO_ENTRY_CSS_ROW', $this->css_row);
158 $this->tpl->setVariable(
'TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
159 $this->tpl->setVariable(
'TBL_NO_ENTRY_TEXT', trim($no_items_text));
160 $this->tpl->parseCurrentBlock();
176 $match = ilDclTableViewBaseDefaultValue::findSingle($field->getDataTypeId(), $a_set->
getId());
181 if (!is_null($match)) {
183 $item->setChecked($match->getValue());
185 $item->setValue($match->getValue());
189 if (!$field->isStandardField()) {
190 $this->tpl->setVariable(
'TEXT_VISIBLE',
$lng->
txt(
'dcl_tableview_visible'));
191 $this->tpl->setVariable(
'TEXT_REQUIRED_VISIBLE',
$lng->
txt(
'dcl_tableview_required_visible'));
192 $this->tpl->setVariable(
'TEXT_LOCKED_VISIBLE',
$lng->
txt(
'dcl_tableview_locked_visible'));
193 $this->tpl->setVariable(
'TEXT_NOT_VISIBLE',
$lng->
txt(
'dcl_tableview_not_visible'));
194 $this->tpl->setVariable(
'IS_LOCKED', $a_set->
isLockedCreate() ?
'checked' :
'');
195 $this->tpl->setVariable(
'IS_REQUIRED', $a_set->
isRequiredCreate() ?
'checked' :
'');
197 $this->tpl->setVariable(
'IS_VISIBLE', $a_set->
isVisibleCreate() ?
'checked' :
'');
198 $this->tpl->setVariable(
'IS_NOT_VISIBLE', !$a_set->
isVisibleCreate() ?
'checked' :
'');
199 if (!is_null($item) && in_array($field->getDatatypeId(), self::VALID_DEFAULT_VALUE_TYPES)) {
200 $name =
"default_" . $a_set->
getId() .
"_" . $field->getDatatypeId();
201 $item->setPostVar(
$name);
204 $replacement_box->setPostVar($item->getPostVar());
205 $replacement_box->setValue($item->getValue());
206 $this->tpl->setVariable(
'INPUT', $replacement_box->render());
208 $this->tpl->setVariable(
'INPUT', $item->render());
213 $this->tpl->setVariable(
'EXTRA_INPUT',
"<input type=\"hidden\" name=\"$name\" value=\"0\" />");
217 $this->tpl->setVariable(
'HIDDEN',
'hidden');
220 $this->tpl->setVariable(
'FIELD_ID', $a_set->
getField());
221 $this->tpl->setVariable(
'TITLE', $field->getTitle());
222 $this->tpl->parseCurrentBlock();
numericOrdering(string $a_field)
Should this field be sorted numeric?
prepareOutput()
Anything that must be done before HTML is generated.
setTopCommands(bool $a_val)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
const INPUTFORMAT_BOOLEAN
setShowTemplates(bool $a_value)
__construct(ilDclCreateViewDefinitionGUI $a_parent_obj)
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...
static getFieldRepresentation(ilDclBaseFieldModel $field)
exportData(int $format, bool $send=false)
Export and optionally send current table data.
const VALID_DEFAULT_VALUE_TYPES
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="")
setFooter(string $a_style, string $a_previous="", string $a_next="")
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
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
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)