2include_once(
"./Services/Style/System/classes/class.ilSystemStyleSettings.php");
 
    3include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
    6include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
   54        $this->ctrl = 
$DIC->ctrl();
 
   55        $this->lng = 
$DIC->language();
 
   57        parent::__construct($a_parent_obj, $a_parent_cmd);
 
   61        $this->
setTitle($this->lng->txt(
"manage_system_styles"));
 
   63        $this->
addColumn($this->lng->txt(
"style_name"), 
"style_name");
 
   64        $this->
addColumn($this->lng->txt(
"skin_name"), 
"skin_name");
 
   65        $this->
addColumn($this->lng->txt(
"sty_substyle_of"));
 
   66        $this->
addColumn($this->lng->txt(
"scope"));
 
   67        $this->
addColumn($this->lng->txt(
"default"));
 
   68        $this->
addColumn($this->lng->txt(
"active"));
 
   69        $this->
addColumn($this->lng->txt(
"users"), 
"users");
 
   70        $this->
setRowTemplate(
"tpl.sys_styles_row.html", 
"Services/Style/System");
 
   83        $this->
setFormAction($this->ctrl->getFormAction($this->getParentObject()));
 
   85        $this->
setRowTemplate(
"tpl.sys_styles_row_with_actions.html", 
"Services/Style/System");
 
   90            $this->
addColumn($this->lng->txt(
"actions"));
 
  107        $users_missing_styles = 0;
 
  108        foreach ($all_user_styles as $skin_style_id) {
 
  109            $style_arr = explode(
":", $skin_style_id);
 
  114        $all_styles = ilStyleDefinition::getAllSkinStyles();
 
  115        if ($users_missing_styles > 0) {
 
  116            $all_styles[
"other"] =
 
  118                    "title" => $this->lng->txt(
"other"),
 
  121                    "skin_id" => 
"other",
 
  123                    "skin_name" => 
"other",
 
  125                    "users" => $users_missing_styles
 
  140        $this->tpl->setVariable(
"STYLE_NAME", $a_set[
"style_name"]);
 
  141        $this->tpl->setVariable(
"SKIN_NAME", $a_set[
"skin_name"]);
 
  142        $is_substyle = $a_set[
"substyle_of"] != 
"";
 
  145            $this->tpl->setVariable(
"USERS", $a_set[
"users"]);
 
  147            $this->tpl->setVariable(
"USERS", 
"-");
 
  150        if ($a_set[
"id"] != 
"other") {
 
  151            $this->tpl->setCurrentBlock(
"default_input");
 
  154                $this->tpl->setVariable(
"DEFAULT_ID", $a_set[
"id"]);
 
  158                    $this->tpl->setVariable(
"CHECKED_DEFAULT", 
' checked="checked" ');
 
  160                    $this->tpl->setVariable(
"CHECKED_DEFAULT", 
'');
 
  162                $this->tpl->parseCurrentBlock();
 
  165            $this->tpl->setCurrentBlock(
"active_input");
 
  166            $this->tpl->setVariable(
"ACTIVE_ID", $a_set[
"id"]);
 
  169                $this->tpl->setVariable(
"DISABLED_ACTIVE", 
'disabled');
 
  172                    $this->tpl->setVariable(
"CHECKED_ACTIVE", 
' checked="checked" ');
 
  174                    $this->tpl->setVariable(
"CHECKED_ACTIVE", 
'');
 
  178                    $this->tpl->setVariable(
"CHECKED_ACTIVE", 
' checked="checked" ');
 
  180                    $this->tpl->setVariable(
"CHECKED_ACTIVE", 
'');
 
  184            $this->tpl->parseCurrentBlock();
 
  188            $this->tpl->setVariable(
"SUB_STYLE_OF", $a_set[
"substyle_of_name"]);
 
  192                $a_set[
"substyle_of"],
 
  198            foreach ($assignments as $assignment) {
 
  202            $listing = 
$DIC->ui()->factory()->listing()->unordered($categories);
 
  203            $this->tpl->setVariable(
"CATEGORIES", $this->lng->txt(
"local") . 
$DIC->ui()
 
  207            $this->tpl->setVariable(
"SUB_STYLE_OF", 
"");
 
  208            $this->tpl->setVariable(
"CATEGORIES", $this->lng->txt(
"global"));
 
  212            if ($a_set[
"skin_id"]==
"other") {
 
  213                $this->tpl->setCurrentBlock(
"actions");
 
  214                $this->tpl->setVariable(
"ACTIONS", 
"");
 
  215                $this->tpl->parseCurrentBlock();
 
  218                $action_list->setId(
"id_action_list_" . $a_set[
"id"]);
 
  219                $action_list->setListTitle($this->lng->txt(
"actions"));
 
  222                    $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI', 
'skin_id', $a_set[
"skin_id"]);
 
  223                    $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI', 
'style_id', $a_set[
"style_id"]);
 
  224                    $action_list->addItem(
 
  225                        $this->lng->txt(
'open_documentation'),
 
  227                        $this->ctrl->getLinkTargetByClass(
'ilSystemStyleDocumentationGUI', 
'entries')
 
  232                    $this->ctrl->setParameterByClass(
'ilSystemStyleSettingsGUI', 
'skin_id', $a_set[
"skin_id"]);
 
  233                    $this->ctrl->setParameterByClass(
'ilSystemStyleSettingsGUI', 
'style_id', $a_set[
"style_id"]);
 
  235                    $this->ctrl->setParameterByClass(
'ilSystemStyleOverviewGUI', 
'skin_id', $a_set[
"skin_id"]);
 
  236                    $this->ctrl->setParameterByClass(
'ilSystemStyleOverviewGUI', 
'style_id', $a_set[
"style_id"]);
 
  239                    if ($a_set[
"skin_id"] != 
$config->getDefaultSkinId()) {
 
  243                    if (!$is_substyle && $a_set[
"skin_id"] != 
"default") {
 
  244                        $action_list->addItem($this->lng->txt(
'export'), 
'export', $this->ctrl->getLinkTargetByClass(
'ilSystemStyleOverviewGUI', 
'export'));
 
  249                $this->tpl->setCurrentBlock(
"actions");
 
  250                $this->tpl->setVariable(
"ACTIONS", $action_list->getHTML());
 
  251                $this->tpl->parseCurrentBlock();
 
  258        $action_list->
addItem($this->lng->txt(
'edit'), 
'edit', $this->ctrl->getLinkTargetByClass(
'ilSystemStyleSettingsGUI'));
 
  259        $action_list->
addItem($this->lng->txt(
'delete'), 
'delete', $this->ctrl->getLinkTargetByClass(
'ilSystemStyleOverviewGUI', 
'deleteStyle'));
 
  264        $this->tpl->setCurrentBlock(
"multi_actions");
 
  265        $this->tpl->setVariable(
"MULTI_ACTIONS_ID", 
$id);
 
  266        $this->tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
addItem( $a_title, $a_value="", $a_link="", $a_img="", $a_alt="", $a_frame="", $a_html="", $a_prevent_background_click=false, $a_onclick="", $a_ttip="", $a_tt_my="right center", $a_tt_at="left center", $a_tt_use_htmlspecialchars=true, $a_data=array())
Add an item.
static _getAllUserAssignedStyles()
skins and styles
static _getNumberOfUsersForStyle($a_skin, $a_style)
skins and styles
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static styleExists($style_id)
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
static getSubStyleCategoryAssignments($a_skin_id, $a_style_id, $a_sub_style_id)
Get all system category assignments of exactly one substyle.
static getCurrentDefaultStyle()
Gets default style of the system.
static _lookupActivatedStyle($a_skin, $a_style)
lookup if a style is activated
static getCurrentDefaultSkin()
Gets default Skin of the System.
TableGUI class for system styles.
setWithActions($with_actions)
addActions($management_enabled, $read_documentation=true)
addManagementActionsToList(ilAdvancedSelectionListGUI $action_list)
__construct($a_parent_obj, $a_parent_cmd)
ilSystemStylesTableGUI constructor.
setManagementEnabled($management_enabled)
setReadDocumentation($read_documentation)
setEnableHeader($a_enableheader)
Set Enable 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.
setLimit($a_limit=0, $a_default_limit=0)
set max.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
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.
if(!array_key_exists('StateId', $_REQUEST)) $id