24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
40 function __construct($a_parent_obj, $a_parent_cmd, $a_chars, $a_super_type, $a_style)
45 $this->media_object = $a_media_object;
46 $this->super_type = $a_super_type;
47 $this->style = $a_style;
49 $this->types = $all_super_types[$this->super_type];
52 $this->
setTitle($lng->txt(
"sty_".$a_super_type.
"_char"));
56 $this->expandable =
false;
57 $this->hideable =
false;
58 foreach ($this->types as
$t)
62 $this->expandable =
true;
66 $this->hideable =
true;
70 if ($this->expandable)
74 $this->
addColumn($this->lng->txt(
"sty_name"),
"",
"1");
75 $this->
addColumn($this->lng->txt(
"sty_type"),
"",
"");
76 $this->
addColumn($this->lng->txt(
"sty_example"),
"",
"");
79 $this->
addColumn($this->lng->txt(
"sty_hide"),
"",
"");
81 $this->
addColumn($this->lng->txt(
"sty_commands"),
"",
"1");
90 $this->
addCommandButton(
"saveHideStatus", $lng->txt(
"sty_save_hide_status"));
94 if ($this->expandable)
96 $this->
addMultiCommand(
"deleteCharacteristicConfirmation", $lng->txt(
"delete"));
97 $this->
addCommandButton(
"addCharacteristicForm", $lng->txt(
"sty_add_characteristic"));
112 $types = $stypes[$this->super_type];
114 if (!in_array($a_set[
"type"], $types))
120 if ($this->expandable)
122 if (!empty($this->core_styles[$a_set[
"type"].
".".
124 ".".$a_set[
"class"]]))
126 $this->tpl->touchBlock(
"no_checkbox");
130 $this->tpl->setCurrentBlock(
"checkbox");
131 $this->tpl->setVariable(
"CHAR", $a_set[
"type"].
".".
133 ".".$a_set[
"class"]);
134 $this->tpl->parseCurrentBlock();
141 (!empty($this->core_styles[$a_set[
"type"].
".".
143 ".".$a_set[
"class"]])))
145 $this->tpl->touchBlock(
"no_hide_checkbox");
149 $this->tpl->setCurrentBlock(
"hide_checkbox");
150 $this->tpl->setVariable(
"CHAR", $a_set[
"type"].
".".
152 ".".$a_set[
"class"]);
153 if ($this->style->getHideStatus($a_set[
"type"], $a_set[
"class"]))
155 $this->tpl->setVariable(
"CHECKED",
"checked='checked'");
157 $this->tpl->parseCurrentBlock();
162 $this->tpl->setVariable(
"EXAMPLE",
166 $this->tpl->setVariable(
"TXT_TAG", $a_set[
"class"]);
167 $this->tpl->setVariable(
"TXT_TYPE", $lng->txt(
"sty_type_".$a_set[
"type"]));
168 $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
169 $ilCtrl->setParameter($this->parent_obj,
"tag", $tag_str);
170 $ilCtrl->setParameter($this->parent_obj,
"style_type", $a_set[
"type"]);
171 $this->tpl->setVariable(
"LINK_EDIT_TAG_STYLE",
172 $ilCtrl->getLinkTarget($this->parent_obj,
"editTagStyle"));