24 require_once(
"./Services/COPage/classes/class.ilPCSection.php");
25 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
44 function ilPCSectionGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id =
"")
55 $next_class = $this->ctrl->getNextClass($this);
58 $cmd = $this->ctrl->getCmd();
81 function edit($a_insert =
false)
88 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
90 $form->setFormAction($ilCtrl->getFormAction($this));
93 $form->setTitle($this->lng->txt(
"cont_insert_section"));
97 $form->setTitle($this->lng->txt(
"cont_update_section"));
101 require_once(
"./Services/Form/classes/class.ilRadioMatrixInputGUI.php");
104 $chars = array(
"ilc_Block" => $this->lng->txt(
"cont_Block"),
105 "ilc_Mnemonic" => $this->lng->txt(
"cont_Mnemonic"),
106 "ilc_Remark" => $this->lng->txt(
"cont_Remark"),
107 "ilc_Example" => $this->lng->txt(
"cont_Example"),
108 "ilc_Additional" => $this->lng->txt(
"cont_Additional"),
109 "ilc_Special" => $this->lng->txt(
"cont_Special"),
110 "ilc_Excursus" => $this->lng->txt(
"cont_Excursus"));
111 $selected = ($a_insert)
113 : $this->content_obj->getCharacteristic();
115 foreach($chars as $k => $char)
117 $chars[$k] =
'<div class="'.$k.
'">'.
122 $char_prop->setOptions($chars);
123 $form->addItem($char_prop);
128 $form->addCommandButton(
"create_section", $lng->txt(
"save"));
129 $form->addCommandButton(
"cancelCreate", $lng->txt(
"cancel"));
133 $form->addCommandButton(
"update_section", $lng->txt(
"save"));
134 $form->addCommandButton(
"cancelUpdate", $lng->txt(
"cancel"));
136 $html = $form->getHTML();
137 $tpl->setContent($html);
149 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
150 $this->content_obj->setCharacteristic($_POST[
"characteristic"]);
151 $this->updated = $this->pg_obj->update();
152 if ($this->updated ===
true)
154 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
167 $this->content_obj->setCharacteristic($_POST[
"characteristic"]);
168 $this->updated = $this->pg_obj->update();
169 if ($this->updated ===
true)
171 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
175 $this->pg_obj->addHierIDs();