4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
   20        function __construct($a_parent_obj, $a_parent_cmd, $a_data, $a_style_settings)
 
   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");
 
   45                if ($rbacsystem->checkAccess(
"write",$this->parent_obj->object->getRefId()))
 
   48                        $this->
addCommandButton(
"saveActiveStyles", $lng->txt(
"sty_save_active_styles"));
 
   61                        $this->tpl->setCurrentBlock(
"cb");
 
   62                        $this->tpl->setVariable(
"ID", $a_set[
"id"]);
 
   63                        $this->tpl->parseCurrentBlock();
 
   65                        $this->tpl->setCurrentBlock(
"cb_act");
 
   68                                $this->tpl->setVariable(
"ACT_CHECKED", 
"checked='checked'");
 
   70                        $this->tpl->setVariable(
"ID", $a_set[
"id"]);
 
   71                        $this->tpl->parseCurrentBlock();
 
   73                        $this->tpl->setCurrentBlock(
"edit_link");
 
   74                        $ilCtrl->setParameterByClass(
"ilobjstylesheetgui", 
"obj_id", $a_set[
"id"]);
 
   75                        $this->tpl->setVariable(
"EDIT_LINK", 
$ilCtrl->getLinkTargetByClass(
"ilobjstylesheetgui", 
""));
 
   76                        $ilCtrl->setParameterByClass(
"ilobjstylesheetgui", 
"obj_id", 
"");
 
   77                        $this->tpl->setVariable(
"EDIT_TITLE", $a_set[
"title"]);
 
   78                        $this->tpl->parseCurrentBlock();
 
   82                        $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
 
   85                $ilCtrl->setParameter($this->parent_obj, 
"id", $a_set[
"id"]);
 
   86                if ($a_set[
"id"] > 0 && $rbacsystem->checkAccess(
"write",$this->parent_obj->object->getRefId()))
 
   89                        $list->setListTitle(
$lng->txt(
"actions"));
 
   90                        $list->setId(
"sty_act_".$a_set[
"id"]);
 
   93                        if ($this->default_style == $a_set[
"id"])
 
   95                                $list->addItem(
$lng->txt(
"sty_remove_global_default_state"), 
"",
 
   96                                        $ilCtrl->getLinkTarget($this->parent_obj, 
"toggleGlobalDefault"));
 
   98                        else if ($a_set[
"active"])
 
  100                                $list->addItem(
$lng->txt(
"sty_make_global_default"), 
"",
 
  101                                        $ilCtrl->getLinkTarget($this->parent_obj, 
"toggleGlobalDefault"));
 
  105                        if ($this->fixed_style == $a_set[
"id"])
 
  107                                $list->addItem(
$lng->txt(
"sty_remove_global_fixed_state"), 
"",
 
  108                                        $ilCtrl->getLinkTarget($this->parent_obj, 
"toggleGlobalFixed"));
 
  110                        else if ($a_set[
"active"])
 
  112                                $list->addItem(
$lng->txt(
"sty_make_global_fixed"), 
"",
 
  113                                        $ilCtrl->getLinkTarget($this->parent_obj, 
"toggleGlobalFixed"));
 
  115                        $list->addItem(
$lng->txt(
"sty_set_scope"), 
"",
 
  116                                $ilCtrl->getLinkTarget($this->parent_obj, 
"setScope"));
 
  118                        $this->tpl->setVariable(
"ACTIONS", $list->getHTML());
 
  120                        if ($a_set[
"id"] == $this->fixed_style)
 
  122                                $this->tpl->setVariable(
"PURPOSE", 
$lng->txt(
"global_fixed"));
 
  124                        if ($a_set[
"id"] == $this->default_style)
 
  126                                $this->tpl->setVariable(
"PURPOSE", 
$lng->txt(
"global_default"));
 
  130                $ilCtrl->setParameter($this->parent_obj, 
"id", 
"");
 
  132                $this->tpl->setVariable(
"NR_LM", $a_set[
"lm_nr"]);
 
  134                if ($a_set[
"category"] > 0)
 
  136                        $this->tpl->setVariable(
"SCOPE",
 
User interface class for advanced drop-down selection lists.
__construct($a_parent_obj, $a_parent_cmd, $a_data, $a_style_settings)
Constructor.
fillRow($a_set)
Fill table row.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.