26 protected \ILIAS\COPage\InternalGUIService
$gui;
27 protected \ILIAS\DI\UIServices
$ui;
28 protected \ilLanguage
$lng;
35 $this->
lng = $DIC->language();
36 $this->
ctrl = $DIC->ctrl();
37 $this->
ui = $DIC->ui();
38 $this->gui = $DIC->copage()->internal()->gui();
49 $lng = $DIC->language();
50 $lng->loadLanguageModule(
"content");
53 $acc->addItem($lng->txt(
"cont_set_manuall"), $this->getCreationForm($page_gui, $ui_wrapper, $style_id));
54 $acc->addItem($lng->txt(
"cont_paste_from_spreadsheet"), $this->getImportForm($page_gui, $ui_wrapper, $style_id));
57 $form = $this->getCreationForm($page_gui, $ui_wrapper, $style_id);
59 "creation_form" => $acc->getHTML(
true),
61 "top_actions" => $this->
getTopActions($ui_wrapper, $page_gui),
63 "cell_actions" => $this->getCellActions($ui_wrapper, $page_gui, $style_id),
64 "merge_actions" => $this->
getMergeActions($ui_wrapper, $page_gui, $style_id),
69 protected function getCreationForm(
80 $form = $tab_gui->initCreationForm();
85 [
"Page",
"component.save", $lng->txt(
"insert")],
86 [
"Page",
"component.cancel", $lng->txt(
"cancel")]
93 protected function getEditForm(
102 $tab = $page_gui->
getPageObject()->getContentObjectForPcId($pcid);
107 $form = $tab_gui->initEditingForm();
112 [
"Page",
"component.update.back", $lng->txt(
"save")],
121 protected function getImportForm(
132 $form = $tab_gui->initImportForm();
137 [
"Page",
"component.save", $lng->txt(
"insert")],
138 [
"Page",
"component.cancel", $lng->txt(
"cancel")]
152 $tpl = new \ilTemplate(
"tpl.table_top_actions.html",
true,
true,
"components/ILIAS/COPage/Editor");
155 $lng->txt(
"cont_finish_table_editing"),
170 $tpl->setVariable(
"QUIT_BUTTON", $quit_button);
174 [
"Table",
"switch.edit.table", $lng->txt(
"cont_edit_table")],
175 [
"Table",
"switch.format.cells", $lng->txt(
"cont_format_cells")],
176 [
"Table",
"switch.merge.cells", $lng->txt(
"cont_merge_cells")]
179 $tpl->setVariable(
"SWITCH", $html);
192 $this->getEditForm($page_gui, $ui_wrapper, $style_id, $pcid) .
193 $this->getAdvancedSettingsLink($page_gui, $pcid);
196 protected function getAdvancedSettingsLink(
202 $tab = $page->getContentObjectForPcId($pcid);
204 $link = $this->
ui->factory()->button()->shy(
205 $this->
lng->txt(
"cont_table_adv_settings"),
206 $this->
ctrl->getLinkTarget($tab_gui,
"editProperties")
208 return $this->
ui->renderer()->renderAsync($link);
213 return "<div id='ilPageEditLegend' class='subtitle'>" .
214 "<p>" . $this->
lng->txt(
"cont_table_cell_edit_info_1") .
"</p>" .
215 "<p>" . $this->
lng->txt(
"cont_table_cell_edit_info_2") .
"</p>" .
216 "<p>" . $this->
lng->txt(
"cont_table_cell_edit_info_3") .
"</p>" .
220 protected function getCellActions(
231 $form = $tab_gui->initCellPropertiesForm();
246 [
"Table",
"properties.set", $lng->txt(
"cont_set_properties")],
261 $lng->txt(
"cont_merge_cells"),
268 return '<div class="copg-edit-button-group">' . $html .
'</div>';
275 ->form([
"ilPCDataTableGUI"],
"#")
297 ->modal(
"#modal-title#")
298 ->form($form,
"#on-form-submit-click#")->getTriggerButtonComponents(
303 $modalt[
"signal"] =
$components[
"modal"]->getShowSignal()->getId();
304 $modalt[
"modal"] = $this->
ui->renderer()->renderAsync(
$components[
"modal"]);
305 $modalt[
"button"] = $this->
ui->renderer()->renderAsync(
$components[
"button"]);
getEditComponentForm(UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, string $pcid)
Get rendered editor elements.
getMergeActions(UIWrapper $ui_wrapper, ilPageObjectGUI $page_gui, int $style_id=0)
getRenderedIcon(string $type)
getRenderedViewControl(array $actions)
loadLanguageModule(string $a_module)
Load language module.
getTopActions(UIWrapper $ui_wrapper, ilPageObjectGUI $page_gui)
getRenderedButton(string $content, string $type, string $action, ?array $data=null, string $component="", bool $primary=false, string $aria_label="")
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ILIAS COPage InternalGUIService $gui
getRenderedForm(\ilPropertyFormGUI $form, array $buttons)
setStyleId(int $a_styleid)
getModalNumberInputTemplate()
getEditorElements(UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
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...