5 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
 
   21         function __construct($a_parent_obj, $a_parent_cmd, $a_chars, $a_super_type, $a_style)
 
   26                 $this->media_object = $a_media_object;
 
   27                 $this->super_type = $a_super_type;
 
   28                 $this->style = $a_style;
 
   30                 $this->types = $all_super_types[$this->super_type];
 
   33                 $this->
setTitle($lng->txt(
"sty_".$a_super_type.
"_char"));
 
   37                 $this->expandable = 
false;
 
   38                 $this->hideable = 
false;
 
   39                 foreach ($this->types as 
$t)
 
   43                                 $this->expandable = 
true;
 
   47                                 $this->hideable = 
true;
 
   55                 $this->
addColumn($this->lng->txt(
"sty_name"), 
"", 
"1");
 
   56                 $this->
addColumn($this->lng->txt(
"sty_type"), 
"", 
"");
 
   57                 $this->
addColumn($this->lng->txt(
"sty_example"), 
"", 
"");
 
   60                         $this->
addColumn($this->lng->txt(
"sty_hide"), 
"", 
"");  
 
   62                 $this->
addColumn($this->lng->txt(
"sty_commands"), 
"", 
"1");
 
   68                 if ($rbacsystem->checkAccess(
"write", (
int) 
$_GET[
"ref_id"]))
 
   73                                 $this->
addCommandButton(
"saveHideStatus", $lng->txt(
"sty_save_hide_status"));
 
   79                         if ($this->expandable)
 
   81                                 $this->
addMultiCommand(
"deleteCharacteristicConfirmation", $lng->txt(
"delete"));
 
   98                 $types = $stypes[$this->super_type];
 
  100                 if (!in_array($a_set[
"type"], $types))
 
  116                                 $this->tpl->setCurrentBlock(
"checkbox");
 
  117                                 $this->tpl->setVariable(
"CHAR", $a_set[
"type"].
".".
 
  119                                         ".".$a_set[
"class"]);
 
  120                                 $this->tpl->parseCurrentBlock();
 
  127                                 (!empty($this->core_styles[$a_set[
"type"].
".".
 
  129                                 ".".$a_set[
"class"]])))
 
  131                                 $this->tpl->touchBlock(
"no_hide_checkbox");
 
  135                                 $this->tpl->setCurrentBlock(
"hide_checkbox");
 
  136                                 $this->tpl->setVariable(
"CHAR", $a_set[
"type"].
".".
 
  138                                         ".".$a_set[
"class"]);
 
  139                                 if ($this->style->getHideStatus($a_set[
"type"], $a_set[
"class"]))
 
  141                                         $this->tpl->setVariable(
"CHECKED", 
"checked='checked'");
 
  143                                 $this->tpl->parseCurrentBlock();
 
  148                 $this->tpl->setVariable(
"EXAMPLE",
 
  151                 $this->tpl->setVariable(
"TXT_TAG", $a_set[
"class"]);
 
  152                 $this->tpl->setVariable(
"TXT_TYPE", $lng->txt(
"sty_type_".$a_set[
"type"]));
 
  154                 if ($rbacsystem->checkAccess(
"write", (
int) 
$_GET[
"ref_id"]))
 
  156                         $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  157                         $ilCtrl->setParameter($this->parent_obj, 
"tag", $tag_str);
 
  158                         $ilCtrl->setParameter($this->parent_obj, 
"style_type", $a_set[
"type"]);
 
  159                         $this->tpl->setVariable(
"LINK_EDIT_TAG_STYLE",
 
  160                                 $ilCtrl->getLinkTarget($this->parent_obj, 
"editTagStyle"));