4 require_once(
"./Services/COPage/classes/class.ilPCSection.php");
 
    5 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
   24         function ilPCSectionGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = 
"")
 
   38                 return array(
"Block" => $lng->txt(
"cont_Block"),
 
   39                         "Mnemonic" => $lng->txt(
"cont_Mnemonic"),
 
   40                         "Remark" => $lng->txt(
"cont_Remark"),
 
   41                         "Example" => $lng->txt(
"cont_Example"),
 
   42                         "Additional" => $lng->txt(
"cont_Additional"),
 
   43                         "Special" => $lng->txt(
"cont_Special"),
 
   44                         "Excursus" => $lng->txt(
"cont_Excursus"));
 
   54                 if ($a_style_id > 0 &&
 
   57                         include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
   59                         $chars = $style->getCharacteristics(
"section");
 
   61                         foreach ($chars as $char)
 
   63                                 if ($chars[$char] != 
"")        
 
   65                                         $new_chars[$char] = $chars[$char];
 
   69                                         $new_chars[$char] = $char;
 
   86                 $next_class = $this->ctrl->getNextClass($this);
 
   89                 $cmd = $this->ctrl->getCmd();
 
  112         function edit($a_insert = 
false)
 
  119                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  121                 $form->setFormAction($ilCtrl->getFormAction($this));
 
  124                         $form->setTitle($this->lng->txt(
"cont_insert_section"));
 
  128                         $form->setTitle($this->lng->txt(
"cont_update_section"));
 
  132                 require_once(
"./Services/Form/classes/class.ilAdvSelectInputGUI.php");
 
  137                 if (is_object($this->content_obj))
 
  139                         if ($chars[$a_seleted_value] == 
"" && ($this->content_obj->getCharacteristic() != 
""))
 
  141                                 $chars = array_merge(
 
  142                                         array($this->content_obj->getCharacteristic() => $this->content_obj->getCharacteristic()),
 
  147                 $selected = ($a_insert)
 
  149                         : $this->content_obj->getCharacteristic();
 
  151                 foreach($chars as $k => $char)
 
  153                         $html = 
'<div class="ilc_section_'.$k.
'">'.
 
  155                         $char_prop->addOption($k, $char, $html);
 
  158                 $char_prop->setValue($selected); 
 
  159                 $form->addItem($char_prop);
 
  164                         $form->addCommandButton(
"create_section", $lng->txt(
"save"));
 
  165                         $form->addCommandButton(
"cancelCreate", $lng->txt(
"cancel"));
 
  169                         $form->addCommandButton(
"update", $lng->txt(
"save"));
 
  170                         $form->addCommandButton(
"cancelUpdate", $lng->txt(
"cancel"));
 
  172                 $html = $form->getHTML();
 
  173                 $tpl->setContent($html);
 
  185                 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
 
  186                 $this->content_obj->setCharacteristic(
$_POST[
"characteristic"]);
 
  187                 $this->updated = $this->pg_obj->update();
 
  188                 if ($this->updated === 
true)
 
  190                         $this->ctrl->returnToParent($this, 
"jump".$this->hier_id);
 
  203                 $this->content_obj->setCharacteristic(
$_POST[
"characteristic"]);
 
  204                 $this->updated = $this->pg_obj->update();
 
  205                 if ($this->updated === 
true)
 
  207                         $this->ctrl->returnToParent($this, 
"jump".$this->hier_id);
 
  211                         $this->pg_obj->addHierIDs();