40 $this->content_object =& $a_content_obj;
53 if (is_array($a_actions))
55 foreach ($a_actions as $name =>
$lng)
57 $this->actions[$name] = array(
"name" => $name,
"lng" =>
$lng);
76 if ($this->target_frame[$a_cmd] !=
"")
78 return $this->target_frame[$a_cmd];
80 elseif (!empty($a_target_frame))
82 return "target=\"".$a_target_frame.
"\"";
97 $this->ctrl->setParameter($this,
"new_type", $new_type);
98 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
100 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
101 $form->setTitle( $this->lng->txt($new_type.
"_new"));
103 $title =
new ilTextInputGUI($this->lng->txt(
"title"),
"Fobject[title]");
105 $form->addItem($title);
108 $form->addItem($desc);
110 $form->addCommandButton(
"save", $this->lng->txt($new_type.
"_add"));
111 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
113 $this->tpl->setContent($form->getHTML());
122 $tree =
new ilTree($this->content_object->getId());
124 $tree->setTreeTablePK(
"lm_id");
126 $parent_id = (!empty(
$_GET[
"obj_id"]))
128 : $tree->getRootId();
130 if (!empty(
$_GET[
"target"]))
132 $target =
$_GET[
"target"];
137 $childs =& $tree->getChildsByType($parent_id, $this->obj->getType());
138 if (count($childs) == 0)
144 $target = $childs[count($childs) - 1][
"obj_id"];
147 if (!$tree->isInTree($this->obj->getId()))
149 $tree->insertNode($this->obj->getId(), $parent_id, $target);
163 $cont_obj_gui->
delete($this->obj->getId());
173 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
185 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
196 $this->tpl->setCurrentBlock(
"begin_link");
197 $this->tpl->setVariable(
"LINK_TARGET", $link);
198 $this->tpl->parseCurrentBlock();
199 $this->tpl->touchBlock(
"end_link");
202 $this->tpl->setCurrentBlock(
"text");
203 $this->tpl->setVariable(
"TEXT_CONTENT", $val);
204 $this->tpl->parseCurrentBlock();
205 $this->tpl->setCurrentBlock(
"table_cell");
206 $this->tpl->parseCurrentBlock();
217 foreach ($a_actions as $name =>
$lng)
219 $d[$name] = array(
"name" => $name,
"lng" =>
$lng);
222 $notoperations = array();
223 $operations = array();
227 if (count($operations) > 0)
229 foreach ($operations as $val)
231 $this->tpl->setCurrentBlock(
"operation_btn");
232 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
233 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
234 $this->tpl->parseCurrentBlock();
237 $this->tpl->setCurrentBlock(
"operation");
239 $this->tpl->parseCurrentBlock();
248 $this->content_object->checkTree();