4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
24 $this->fixed_style = $ilSetting->get(
"fixed_content_style_id");
25 $this->default_style = $ilSetting->get(
"default_content_style_id");
27 $this->
setId(
"sty_cs");
28 $this->sty_settings = $a_style_settings;
30 parent::__construct($a_parent_obj, $a_parent_cmd);
32 $this->
setTitle($lng->txt(
"content_styles"));
35 $this->
addColumn($this->lng->txt(
"title"));
36 $this->
addColumn($this->lng->txt(
"sty_nr_learning_modules"));
37 $this->
addColumn($this->lng->txt(
"purpose"));
38 $this->
addColumn($this->lng->txt(
"sty_scope"));
39 $this->
addColumn($this->lng->txt(
"active"));
40 $this->
addColumn($this->lng->txt(
"actions"));
43 $this->
setRowTemplate(
"tpl.content_style_row.html",
"Services/Style/Content");
44 if ($this->parent_obj->checkPermission(
"sty_write_content",
false))
47 $this->
addCommandButton(
"saveActiveStyles", $lng->txt(
"sty_save_active_styles"));
60 $this->tpl->setCurrentBlock(
"cb");
61 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
62 $this->tpl->parseCurrentBlock();
64 $this->tpl->setCurrentBlock(
"cb_act");
67 $this->tpl->setVariable(
"ACT_CHECKED",
"checked='checked'");
69 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
70 $this->tpl->parseCurrentBlock();
72 $this->tpl->setCurrentBlock(
"edit_link");
73 $ilCtrl->setParameterByClass(
"ilobjstylesheetgui",
"obj_id", $a_set[
"id"]);
74 $this->tpl->setVariable(
"EDIT_LINK", $ilCtrl->getLinkTargetByClass(
"ilobjstylesheetgui",
""));
75 $ilCtrl->setParameterByClass(
"ilobjstylesheetgui",
"obj_id",
"");
76 $this->tpl->setVariable(
"EDIT_TITLE", $a_set[
"title"]);
77 $this->tpl->parseCurrentBlock();
81 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
84 $ilCtrl->setParameter($this->parent_obj,
"id", $a_set[
"id"]);
85 if ($a_set[
"id"] > 0 && $this->parent_obj->checkPermission(
"sty_write_content",
false))
88 $list->setListTitle($lng->txt(
"actions"));
89 $list->setId(
"sty_act_".$a_set[
"id"]);
92 if ($this->default_style == $a_set[
"id"])
94 $list->addItem($lng->txt(
"sty_remove_global_default_state"),
"",
95 $ilCtrl->getLinkTarget($this->parent_obj,
"toggleGlobalDefault"));
97 else if ($a_set[
"active"])
99 $list->addItem($lng->txt(
"sty_make_global_default"),
"",
100 $ilCtrl->getLinkTarget($this->parent_obj,
"toggleGlobalDefault"));
104 if ($this->fixed_style == $a_set[
"id"])
106 $list->addItem($lng->txt(
"sty_remove_global_fixed_state"),
"",
107 $ilCtrl->getLinkTarget($this->parent_obj,
"toggleGlobalFixed"));
109 else if ($a_set[
"active"])
111 $list->addItem($lng->txt(
"sty_make_global_fixed"),
"",
112 $ilCtrl->getLinkTarget($this->parent_obj,
"toggleGlobalFixed"));
114 $list->addItem($lng->txt(
"sty_set_scope"),
"",
115 $ilCtrl->getLinkTarget($this->parent_obj,
"setScope"));
117 $this->tpl->setVariable(
"ACTIONS", $list->getHTML());
119 if ($a_set[
"id"] == $this->fixed_style)
121 $this->tpl->setVariable(
"PURPOSE", $lng->txt(
"global_fixed"));
123 if ($a_set[
"id"] == $this->default_style)
125 $this->tpl->setVariable(
"PURPOSE", $lng->txt(
"global_default"));
129 $ilCtrl->setParameter($this->parent_obj,
"id",
"");
131 $this->tpl->setVariable(
"NR_LM", $a_set[
"lm_nr"]);
133 if ($a_set[
"category"] > 0)
135 $this->tpl->setVariable(
"SCOPE",
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _lookupTitle($a_id)
lookup object title
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
__construct(ilContentStyleSettingsGUI $a_parent_obj, $a_parent_cmd, $a_data, $a_style_settings)
Constructor.
static _lookupObjId($a_id)
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
fillRow($a_set)
Fill table row.
Settings UI class for system styles.