5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
30 $this->
addColumn($this->lng->txt(
"title"));
31 $this->
addColumn($this->lng->txt(
"default"));
32 $this->
addColumn($this->lng->txt(
"users"));
33 $this->
addColumn($this->lng->txt(
"active"));
34 $this->
addColumn($this->lng->txt(
"sty_substyles"));
35 $this->
addColumn($this->lng->txt(
"actions"));
38 $this->
setRowTemplate(
"tpl.sys_styles_row.html",
"Services/Style");
40 if ($rbacsystem->checkAccess(
"write", (
int)
$_GET[
"ref_id"]))
54 global $styleDefinition;
63 $users_missing_styles = 0;
64 foreach($all_user_styles as $style)
66 if (!isset($all_styles[$style]))
68 $style_arr = explode(
":", $style);
73 if ($users_missing_styles > 0)
75 $all_styles[
"other"] =
77 "title" => $this->lng->txt(
"other"),
81 "template_name" =>
"",
83 "users" => $users_missing_styles
102 if (is_array($a_set[
"substyle"]))
104 foreach ($a_set[
"substyle"] as $substyle)
108 foreach($cat_ass as $ca)
110 if ($ca[
"substyle"] == $substyle[
"id"])
112 $this->tpl->setCurrentBlock(
"cat");
115 $this->tpl->parseCurrentBlock();
121 $this->tpl->touchBlock(
"cats");
124 $this->tpl->setCurrentBlock(
"substyle");
125 $this->tpl->setVariable(
"SUB_STYLE", $substyle[
"name"]);
126 $this->tpl->parseCurrentBlock();
128 $this->tpl->touchBlock(
"substyles");
130 $ilCtrl->setParameter($this->parent_obj,
"style_id", urlencode($a_set[
"id"]));
131 $this->tpl->setCurrentBlock(
"cmd");
132 $this->tpl->setVariable(
"HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj,
133 "assignStylesToCats"));
134 $this->tpl->setVariable(
"TXT_CMD", $lng->txt(
"sty_assign_categories"));
135 $this->tpl->parseCurrentBlock();
138 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
139 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
142 $this->tpl->setVariable(
"USERS", $a_set[
"users"]);
147 $this->tpl->setVariable(
"CHECKED",
' checked="checked" ');
150 if ($ilClientIniFile->readVariable(
"layout",
"skin") == $a_set[
"template_id"] &&
151 $ilClientIniFile->readVariable(
"layout",
"style") == $a_set[
"style_id"])
153 $this->tpl->setVariable(
"CHECKED_DEFAULT",
' checked="checked" ');