4 include_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
    5 include_once(
"./Services/Style/classes/class.ilPageLayout.php");
 
   32                 $cmd = $ilCtrl->getCmd();
 
   34                 if (
$cmd == 
"editPg") {
 
   35                         $this->peditor_active = 
true;
 
   38                 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
 
   40                 $lng->loadLanguageModule(
"style");
 
   48                 $next_class = $this->ctrl->getNextClass($this);
 
   49                 $cmd = $this->ctrl->getCmd();
 
   51                 if ($next_class == 
"ilpagelayoutgui" || 
$cmd ==
"createPg") {
 
   52                         $this->peditor_active =
true;
 
   59                         case 'ilpermissiongui':
 
   60                                 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   62                                 $ret =& $this->ctrl->forwardCommand($perm_gui);
 
   65                         case 'ilpagelayoutgui':
 
   66                                 include_once(
"./Services/Style/classes/class.ilPageLayoutGUI.php");
 
   67                                 $this->tpl->getStandardTemplate();
 
   68                                 $this->ctrl->setReturn($this, 
"edit");
 
   69                                 if ($this->pg_id!=null) {
 
   74                                 $layout_gui->setTabs();
 
   75                                 $layout_gui->setEditPreview(
true);
 
   76                                 $this->ctrl->saveParameter($this, 
"obj_id");
 
   77                                 $ret =& $this->ctrl->forwardCommand($layout_gui);
 
   78                                 $this->tpl->setContent(
$ret);
 
   84                                         $cmd = 
"editBasicSettings";
 
  119                 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  121                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  124                 $this->tpl->addBlockfile(
"ADM_CONTENT", 
"style_basic_settings", 
"tpl.stys_basic_settings.html", 
"Services/Style");
 
  127                 $settings = $this->ilias->getAllSettings();
 
  129                 if ($rbacsystem->checkAccess(
"write", $this->object->getRefId()))
 
  131                         $this->tpl->setCurrentBlock(
"save_but");
 
  132                         $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
  133                         $this->tpl->parseCurrentBlock();
 
  136                 $this->tpl->setVariable(
"FORMACTION_STYLESETTINGS", $this->ctrl->getFormAction($this));
 
  138                 $this->tpl->setVariable(
"TXT_TREE_FRAME", $this->lng->txt(
"tree_frame"));
 
  139                 $this->tpl->setVariable(
"TXT_TREE_FRAME_INFO", $this->lng->txt(
"tree_frame_info"));
 
  140                 $this->tpl->setVariable(
"TXT_FRAME_LEFT", $this->lng->txt(
"tree_left"));
 
  141                 $this->tpl->setVariable(
"TXT_FRAME_RIGHT", $this->lng->txt(
"tree_right"));
 
  143                 $this->tpl->setVariable(
"TXT_STYLE_SETTINGS", $this->lng->txt(
"settings"));
 
  144                 $this->tpl->setVariable(
"TXT_ICONS_IN_TYPED_LISTS", $this->lng->txt(
"icons_in_typed_lists"));
 
  145                 $this->tpl->setVariable(
"TXT_ICONS_IN_HEADER", $this->lng->txt(
"icons_in_header"));
 
  146                 $this->tpl->setVariable(
"TXT_ICONS_IN_ITEM_ROWS", $this->lng->txt(
"icons_in_item_rows"));
 
  147                 $this->tpl->setVariable(
"TXT_ICONS_IN_TYPED_LISTS_INFO", $this->lng->txt(
"icons_in_typed_lists_info"));
 
  149                 $this->tpl->setVariable(
"TXT_ENABLE_CUSTOM_ICONS", $this->lng->txt(
"enable_custom_icons"));
 
  150                 $this->tpl->setVariable(
"TXT_ENABLE_CUSTOM_ICONS_INFO", $this->lng->txt(
"enable_custom_icons_info"));
 
  151                 $this->tpl->setVariable(
"TXT_CUSTOM_ICON_SIZE_BIG", $this->lng->txt(
"custom_icon_size_big"));
 
  152                 $this->tpl->setVariable(
"TXT_CUSTOM_ICON_SIZE_SMALL", $this->lng->txt(
"custom_icon_size_standard"));
 
  153                 $this->tpl->setVariable(
"TXT_CUSTOM_ICON_SIZE_TINY", $this->lng->txt(
"custom_icon_size_tiny"));
 
  154                 $this->tpl->setVariable(
"TXT_WIDTH_X_HEIGHT", $this->lng->txt(
"width_x_height"));
 
  157                 if ($settings[
"tree_frame"] == 
"right")
 
  159                         $this->tpl->setVariable(
"SEL_FRAME_RIGHT",
"selected=\"selected\"");
 
  163                         $this->tpl->setVariable(
"SEL_FRAME_LEFT",
"selected=\"selected\"");
 
  166                 if ($settings[
"custom_icons"])
 
  168                         $this->tpl->setVariable(
"CHK_CUSTOM_ICONS",
"checked=\"checked\"");
 
  178                 $this->tpl->setVariable(
"CUST_ICON_BIG_WIDTH", $settings[
"custom_icon_big_width"]);
 
  179                 $this->tpl->setVariable(
"CUST_ICON_BIG_HEIGHT", $settings[
"custom_icon_big_height"]);
 
  180                 $this->tpl->setVariable(
"CUST_ICON_SMALL_WIDTH", $settings[
"custom_icon_small_width"]);
 
  181                 $this->tpl->setVariable(
"CUST_ICON_SMALL_HEIGHT", $settings[
"custom_icon_small_height"]);
 
  182                 $this->tpl->setVariable(
"CUST_ICON_TINY_WIDTH", $settings[
"custom_icon_tiny_width"]);
 
  183                 $this->tpl->setVariable(
"CUST_ICON_TINY_HEIGHT", $settings[
"custom_icon_tiny_height"]);
 
  193                 $this->ilias->setSetting(
"tree_frame", 
$_POST[
"tree_frame"]);
 
  195                 $this->ilias->setSetting(
"custom_icons", 
$_POST[
"custom_icons"]);
 
  196                 $this->ilias->setSetting(
"custom_icon_big_width", (
int) 
$_POST[
"custom_icon_big_width"]);
 
  197                 $this->ilias->setSetting(
"custom_icon_big_height", (
int) $_POST[
"custom_icon_big_height"]);
 
  198                 $this->ilias->setSetting(
"custom_icon_small_width", (
int) $_POST[
"custom_icon_small_width"]);
 
  199                 $this->ilias->setSetting(
"custom_icon_small_height", (
int) $_POST[
"custom_icon_small_height"]);
 
  200                 $this->ilias->setSetting(
"custom_icon_tiny_width", (
int) $_POST[
"custom_icon_tiny_width"]);
 
  201                 $this->ilias->setSetting(
"custom_icon_tiny_height", (
int) $_POST[
"custom_icon_tiny_height"]);
 
  203                 ilUtil::redirect($this->ctrl->getLinkTarget($this,
"editBasicSettings",
"",
false,
false));
 
  213                 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  215                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  219                 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
  220                 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  222                 $from_styles = $to_styles = 
$data = array();
 
  223                 $styles = $this->
object->getStyles();
 
  225                 foreach($styles as $style)
 
  229                         $data[$style[
"title"].
":".$style[
"id"]]
 
  231                         if ($style[
"lm_nr"] > 0)
 
  233                                 $from_styles[$style[
"id"]] = $style[
"title"];
 
  235                         if ($style[
"active"] > 0)
 
  237                                 $to_styles[$style[
"id"]] = $style[
"title"];
 
  242                 if ($fixed_style <= 0)
 
  245                                 array(
"title" => $this->lng->txt(
"sty_individual_styles"),
 
  247                         $from_styles[-1] = $this->lng->txt(
"sty_individual_styles");
 
  251                 if ($default_style <= 0 && $fixed_style <= 0)
 
  254                                 array(
"title" => $this->lng->txt(
"sty_default_style"),
 
  256                         $from_styles[0] = $this->lng->txt(
"sty_default_style");
 
  257                         $to_styles[0] = $this->lng->txt(
"sty_default_style");
 
  260                 if ($rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  262                         $ilToolbar->addButton($lng->txt(
"sty_add_content_style"),
 
  263                                 $ilCtrl->getLinkTarget($this, 
"createStyle"));
 
  264                         $ilToolbar->addSeparator();
 
  265                         include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  268                         $si = 
new ilSelectInputGUI($lng->txt(
"sty_move_lm_styles").
": ".$lng->txt(
"sty_from"), 
"from_style");
 
  269                         $si->setOptions($from_styles);
 
  270                         $ilToolbar->addInputItem(
$si, 
true);
 
  274                         $si->setOptions($to_styles);
 
  275                         $ilToolbar->addInputItem(
$si, 
true);
 
  276                         $ilToolbar->addFormButton($lng->txt(
"sty_move_style"), 
"moveLMStyles");
 
  278                         $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
 
  281                 include_once(
"./Services/Style/classes/class.ilContentStylesTableGUI.php");
 
  283                 $tpl->setContent($table->getHTML());
 
  292                 if (
$_POST[
"from_style"] == -1)
 
  298                 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
  300                 $this->ctrl->redirect($this, 
"editContentStyles");
 
  309                 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
  311                 $this->ctrl->redirect($this, 
"editContentStyles");
 
  321                 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  323                 $ilCtrl->setParameter($this, 
"to_style", 
$_POST[
"to_style"]);
 
  326                 $cgui->setFormAction($ilCtrl->getFormAction($this));
 
  327                 $cgui->setHeaderText($lng->txt(
"sty_confirm_del_ind_styles").
": ".
 
  328                         sprintf($this->lng->txt(
"sty_confirm_del_ind_styles_desc"),
 
  330                 $cgui->setCancel($lng->txt(
"cancel"), 
"editContentStyles");
 
  331                 $cgui->setConfirm($lng->txt(
"ok"), 
"moveIndividualStyles");
 
  332                 $tpl->setContent($cgui->getHTML());
 
  342                 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  344                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  350                 if ($rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  352                         include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  357                                 $options[$st[
"id"]] = $st[
"title"];
 
  361                         $si = 
new ilSelectInputGUI($lng->txt(
"sty_move_user_styles").
": ".$lng->txt(
"sty_from"), 
"from_style");
 
  362                         $si->setOptions($options + array(
"other" => $lng->txt(
"other")));
 
  363                         $ilToolbar->addInputItem(
$si, 
true);
 
  367                         $si->setOptions($options);
 
  368                         $ilToolbar->addInputItem(
$si, 
true);
 
  369                         $ilToolbar->addFormButton($lng->txt(
"sty_move_style"), 
"moveUserStyles");
 
  371                         $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
 
  374                 include_once(
"./Services/Style/classes/class.ilSystemStylesTableGUI.php");
 
  376                 $tpl->setContent(
$tab->getHTML());
 
  386                 global $styleDefinition, 
$ilCtrl;
 
  389                 if (count(
$_POST[
"st_act"]) < 1)
 
  391                         $this->ilias->raiseError($this->lng->txt(
"at_least_one_style"), $this->ilias->error_obj->MESSAGE);
 
  395                 if (
$_POST[
"default_skin_style"] != 
"")
 
  397                         $sknst = explode(
":", 
$_POST[
"default_skin_style"]);
 
  399                         if ($this->ilias->ini->readVariable(
"layout",
"style") != $sknst[1] ||
 
  400                                 $this->ilias->ini->readVariable(
"layout",
"skin") != $sknst[0])
 
  402                                 $this->ilias->ini->setVariable(
"layout",
"skin", $sknst[0]);
 
  403                                 $this->ilias->ini->setVariable(
"layout",
"style",$sknst[1]);
 
  405                         $this->ilias->ini->write();
 
  411                 foreach ($all_styles as $st)
 
  413                         if (!isset(
$_POST[
"st_act"][$st[
"id"]]))
 
  417                                         $this->ilias->raiseError($this->lng->txt(
"cant_deactivate_if_users_assigned"), $this->ilias->error_obj->MESSAGE);
 
  431                 $ilCtrl->redirect($this , 
"editSystemStyles");
 
  444                 $to = explode(
":", 
$_POST[
"to_style"]);
 
  446                 if (
$_POST[
"from_style"] != 
"other")
 
  448                         $from = explode(
":", 
$_POST[
"from_style"]);
 
  458                         foreach($all_user_styles as $style)
 
  460                                 if (!in_array($style, $all_styles))
 
  462                                         $style_arr = explode(
":", $style);
 
  469                 $ilCtrl->redirect($this , 
"editSystemStyles");
 
  483                         $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
  487                 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  489                 $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  490                 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  491                 $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelDelete");
 
  492                 $cgui->setConfirm($this->lng->txt(
"confirm"), 
"confirmedDelete");
 
  494                 foreach (
$_POST[
"id"] as $id)
 
  497                                 " ".ilObject::_lookupTitle($id);
 
  499                         $cgui->addItem(
"id[]", $id, $caption);
 
  502                 $this->tpl->setContent($cgui->getHTML());               
 
  513                 foreach(
$_POST[
"id"] as $id)
 
  515                         $this->
object->removeStyle($id);
 
  516                         $style_obj =& $ilias->obj_factory->getInstanceByObjId($id);
 
  517                         $style_obj->delete();
 
  519                 $this->
object->update();
 
  522                         $this->ctrl->getLinkTarget($this,
"editContentStyles",
"",
false,
false)));
 
  535                         $ilSetting->delete(
"fixed_content_style_id");
 
  536                         $def_style = $ilSetting->get(
"default_content_style_id");
 
  538                         if ($def_style != 
$_GET[
"id"])
 
  540                                 $ilSetting->set(
"default_content_style_id", (
int) 
$_GET[
"id"]);
 
  544                                 $ilSetting->delete(
"default_content_style_id");
 
  548                 ilUtil::redirect($this->ctrl->getLinkTarget($this, 
"editContentStyles", 
"", 
false, 
false));
 
  560                         $ilSetting->delete(
"default_content_style_id");
 
  561                         $fixed_style = $ilSetting->get(
"fixed_content_style_id");
 
  562                         if ($fixed_style == (
int) 
$_GET[
"id"])
 
  564                                 $ilSetting->delete(
"fixed_content_style_id");
 
  568                                 $ilSetting->set(
"fixed_content_style_id", (
int) $_GET[
"id"]);
 
  572                 ilUtil::redirect($this->ctrl->getLinkTarget($this, 
"editContentStyles", 
"", 
false, 
false));
 
  581                 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  582                 $styles = $this->
object->getStyles();
 
  583                 foreach($styles as $style)
 
  585                         if (
$_POST[
"std_".$style[
"id"]] == 1)
 
  594                 ilUtil::redirect($this->ctrl->getLinkTarget($this, 
"editContentStyles", 
"", 
false, 
false));
 
  607                 $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  608                 $this->tpl->setVariable(
"BTN_NAME", 
"deleteStyle");
 
  609                 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
 
  610                 $this->tpl->parseCurrentBlock();
 
  613                 $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  614                 $this->tpl->setVariable(
"BTN_NAME", 
"toggleGlobalDefault");
 
  615                 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"toggleGlobalDefault"));
 
  616                 $this->tpl->parseCurrentBlock();
 
  619                 $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  620                 $this->tpl->setVariable(
"BTN_NAME", 
"toggleGlobalFixed");
 
  621                 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"toggleGlobalFixed"));
 
  622                 $this->tpl->parseCurrentBlock();
 
  625                 $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  626                 $this->tpl->setVariable(
"BTN_NAME", 
"setScope");
 
  627                 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"sty_set_scope"));
 
  628                 $this->tpl->parseCurrentBlock();
 
  631                 $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  632                 $this->tpl->setVariable(
"BTN_NAME", 
"saveActiveStyles");
 
  633                 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"sty_save_active_styles"));
 
  634                 $this->tpl->parseCurrentBlock();
 
  636                 if ($with_subobjects === 
true)
 
  641                 $this->tpl->setCurrentBlock(
"tbl_action_row");
 
  643                 $this->tpl->parseCurrentBlock();
 
  654                 $this->ctrl->redirect($this, 
"editContentStyles");
 
  662                         include_once (
"./Services/Style/classes/class.ilStyleScopeExplorer.php");
 
  664                         $exp->setExpandTarget(
"ilias.php?baseClass=ilRepositoryGUI&cmd=showTree");
 
  665                         $exp->setTargetGet(
"ref_id");
 
  667                         $exp->forceExpandAll(
true, 
false);
 
  668                         $exp->addFilter(
"root");
 
  669                         $exp->addFilter(
"cat");
 
  671                         if (
$_GET[
"expand"] == 
"")
 
  673                                 $expanded = $this->tree->readRootId();
 
  677                                 $expanded = 
$_GET[
"expand"];
 
  680                         $exp->setExpand($expanded);
 
  684                         $output = $exp->getOutput();
 
  687                 $this->tpl->setVariable(
"ADM_CONTENT", $output);
 
  697                 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  698                 if (
$_GET[
"cat"] == 0)
 
  704                 ilUtil::redirect($this->ctrl->getLinkTarget($this, 
"editContentStyles", 
"", 
false, 
false));
 
  715                 $ilTabs->setTabActive(
'page_layouts');
 
  718                 if ($rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  720                         $ilToolbar->addButton($lng->txt(
"sty_add_pgl"),
 
  721                                 $ilCtrl->getLinkTarget($this, 
"addPageLayout"));
 
  722                         $ilToolbar->addButton($lng->txt(
"sty_import_page_layout"),
 
  723                                 $ilCtrl->getLinkTarget($this, 
"importPageLayoutForm"));
 
  726                 $oa_tpl = 
new ilTemplate(
"tpl.stys_pglayout.html", 
true, 
true, 
"Services/Style");
 
  728                 include_once(
"./Services/Style/classes/class.ilPageLayoutTableGUI.php");
 
  730                 $oa_tpl->setVariable(
"PGLAYOUT_TABLE", $pglayout_table->getHTML());
 
  731                 $tpl->setContent($oa_tpl->get());
 
  737                 if (!isset(
$_POST[
"pglayout"]))
 
  742                         foreach (
$_POST[
"pglayout"] as $item)
 
  745                                 $pg_layout->activate($a_activate);
 
  748                 $this->ctrl->redirect($this, 
"viewPageLayouts");
 
  764                 if(!isset(
$_POST[
"pglayout"]))
 
  766                         $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
  769                 $ilTabs->setTabActive(
'page_layouts');          
 
  773                 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  775                 $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  776                 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  777                 $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelDeletePg");
 
  778                 $cgui->setConfirm($this->lng->txt(
"confirm"), 
"confirmedDeletePg");             
 
  780                 foreach(
$_POST[
"pglayout"] as $id)
 
  783                         $pg_obj->readObject();
 
  786                                 " ".$pg_obj->getTitle();
 
  788                         $cgui->addItem(
"pglayout[]", $id, $caption);
 
  791                 $this->tpl->setContent($cgui->getHTML());
 
  800                 $this->ctrl->redirect($this, 
"viewPageLayouts");
 
  808                 foreach (
$_POST[
"pglayout"] as $id)
 
  814                 $this->ctrl->redirect($this, 
"viewPageLayouts");
 
  821                 $ilTabs->setTabActive(
'page_layouts');
 
  828         $this->tpl->setContent($a_form->getHTML());
 
  835                 $lng->loadLanguageModule(
"content");
 
  837         include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  839         $form_gui->setFormAction($ilCtrl->getFormAction($this));
 
  840         $form_gui->setTitle($lng->txt(
"sty_create_pgl"));
 
  842         include_once(
"Services/Form/classes/class.ilRadioMatrixInputGUI.php");
 
  845         $title_input = 
new ilTextInputGUI($lng->txt(
"title"),
"pgl_title");
 
  847         $title_input->setMaxLength(128);
 
  848         $title_input->setValue($this->layout_object->title);
 
  849         $title_input->setTitle($lng->txt(
"title"));
 
  850         $title_input->setRequired(
true);
 
  853         $desc_input->
setValue($this->layout_object->description);
 
  854         $desc_input->setRows(3);
 
  855         $desc_input->setCols(37);
 
  859                 "0" => $lng->txt(
"cont_layout_template"),
 
  860                 "1" => $lng->txt(
"cont_special_page"),
 
  871                         $mods->addOption($mod);                 
 
  874                 $ttype_input = 
new ilSelectInputGUI($lng->txt(
"sty_based_on"), 
"pgl_template");
 
  878                 foreach ($arr_templates1 as $v)
 
  880                         $arr_templates[] = $v;
 
  884                 $options[
'-1'] = $lng->txt(
"none");
 
  886                 foreach ($arr_templates as $templ) {
 
  887                         $templ->readObject();
 
  888                         $key = $templ->getId();
 
  889                         $value = $templ->getTitle();
 
  890                         $options[$key] = $value;
 
  893                 $ttype_input->setOptions($options);
 
  894                 $ttype_input->setValue(-1);
 
  895                 $ttype_input->setRequired(
true);
 
  897         $desc_input->setTitle($lng->txt(
"description"));
 
  898         $desc_input->setRequired(
false);
 
  900         $form_gui->addItem($title_input);
 
  901         $form_gui->addItem($desc_input);
 
  902         $form_gui->addItem($si);
 
  903         $form_gui->addItem($mods);
 
  904         $form_gui->addItem($ttype_input);
 
  907         $form_gui->addCommandButton(
"createPg", $lng->txt(
"save"));
 
  908                 $form_gui->addCommandButton(
"cancelCreate", $lng->txt(
"cancel"));
 
  919                 if(!$form_gui->checkInput())
 
  921                         $form_gui->setValuesByPost();
 
  927                 $pg_object->setTitle($form_gui->getInput(
'pgl_title'));
 
  928                 $pg_object->setDescription($form_gui->getInput(
'pgl_desc'));
 
  929                 $pg_object->setSpecialPage($form_gui->getInput(
'special_page'));
 
  930                 $pg_object->setModules($form_gui->getInput(
'module'));          
 
  931                 $pg_object->update();
 
  933                 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
 
  936                 if(!is_object($pg_content))
 
  941                 $this->pg_content->setId($pg_object->getId());
 
  943                 $tmpl = $form_gui->getInput(
'pgl_template');
 
  947                         $this->pg_content->setXMLContent($layout_obj->getXMLContent());
 
  948                         $this->pg_content->create(
false);
 
  952                         $this->pg_content->create(
false);
 
  955                 $ilCtrl->setParameterByClass(
"ilpagelayoutgui", 
"obj_id", $pg_object->getId());
 
  956                 $ilCtrl->redirectByClass(
"ilpagelayoutgui", 
"edit");
 
  967                 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  969                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  972                 $ilCtrl->setCmdClass(
"ilpagelayoutgui");
 
  973                 $ilCtrl->setCmd(
"edit");
 
  980                 echo 
"settings_setTabs";
 
  995                 global $rbacsystem, 
$lng, $ilTabs;
 
  997                 if ($this->peditor_active) {
 
  998                         $tabs_gui->setBackTarget($this->lng->txt(
"page_layouts"),
 
  999                         $this->ctrl->getLinkTarget($this, 
"viewPageLayouts"));
 
 1002                 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()) && !$this->peditor_active)
 
 1004                         $tabs_gui->addTarget(
"settings",
 
 1005                                 $this->ctrl->getLinkTarget($this, 
"editBasicSettings"), array(
"editBasicSettings",
"", 
"view"), 
"", 
"");
 
 1007                         $tabs_gui->addTarget(
"system_styles",
 
 1008                                 $this->ctrl->getLinkTarget($this, 
"editSystemStyles"), 
"editSystemStyles", 
"", 
"");
 
 1010                         $tabs_gui->addTarget(
"content_styles",
 
 1011                                 $this->ctrl->getLinkTarget($this, 
"editContentStyles"), 
"editContentStyles", 
"", 
"");
 
 1013                         $tabs_gui->addTarget(
"page_layouts",
 
 1014                                 $this->ctrl->getLinkTarget($this, 
"viewPageLayouts"), 
"viewPageLayouts", 
"", 
"");
 
 1019                 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()) && !$this->peditor_active)
 
 1021                         $tabs_gui->addTarget(
"perm_settings",
 
 1022                                 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"), array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
 1033                 $ilCtrl->setParameter($this, 
"new_type", 
"sty");
 
 1034                 $ilCtrl->redirect($this, 
"create");
 
 1044                 include_once(
"./Services/Style/classes/class.ilPageLayout.php");
 
 1046                 if (is_array(
$_POST[
"type"]))
 
 1048                         foreach(
$_POST[
"type"] as $id => 
$t)
 
 1054                                         $l->setSpecialPage(
$t);         
 
 1055                                         if(is_array(
$_POST[
"module"][$id]))
 
 1057                                                 $l->setModules(array_keys(
$_POST[
"module"][$id]));
 
 1070                 $ilCtrl->redirect($this, 
"viewPageLayouts");
 
 1079                 include_once(
"./Services/Export/classes/class.ilExport.php");
 
 1085                 $succ = $exp->exportEntity(
"pgtp", (
int) 
$_GET[
"layout_id"], 
"4.2.0",
 
 1086                         "Services/COPage", 
"Title", $tmpdir);
 
 1088                 if ($succ[
"success"])
 
 1091                                 "", 
false, 
false, 
false);
 
 1093                 if (is_file($succ[
"directory"].
"/".$succ[
"file"]))
 
 1095                         unlink($succ[
"directory"].
"/".$succ[
"file"]);
 
 1097                 if (is_dir($succ[
"directory"]))
 
 1099                         unlink($succ[
"directory"]);
 
 1108                 global 
$tpl, $ilTabs;
 
 1110                 $ilTabs->setTabActive(
'page_layouts');
 
 1112                 $tpl->setContent($form->getHTML());
 
 1122                 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1128                 $fi->setRequired(
true);
 
 1129                 $form->addItem($fi);
 
 1131                 $form->addCommandButton(
"importPageLayout", $lng->txt(
"import"));
 
 1132                 $form->addCommandButton(
"viewPageLayouts", $lng->txt(
"cancel"));
 
 1134                 $form->setTitle($lng->txt(
"sty_import_page_layout"));
 
 1135                 $form->setFormAction($ilCtrl->getFormAction($this));
 
 1148                 if ($form->checkInput())
 
 1150                         include_once(
"./Services/Style/classes/class.ilPageLayout.php");
 
 1156                         $ilCtrl->redirect($this, 
"viewPageLayouts");
 
 1160                         $ilTabs->setTabActive(
'page_layouts');
 
 1161                         $form->setValuesByPost();
 
 1162                         $tpl->setContent($form->getHtml());
 
 1176                 $ilCtrl->setParameter($this, 
"style_id", urlencode(
$_GET[
"style_id"]));
 
 1178                 if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId()))
 
 1184                 $sel_style = $all_styles[
$_GET[
"style_id"]];
 
 1187                 if (is_array($sel_style[
"substyle"]))
 
 1189                         foreach ($sel_style[
"substyle"] as $subst)
 
 1191                                 $options[$subst[
"id"]] = $subst[
"name"];
 
 1196                 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 1198                 $si->setOptions($options);
 
 1199                 $ilToolbar->addInputItem(
$si, 
true);
 
 1201                 $ilToolbar->addFormButton($lng->txt(
"sty_add_assignment"), 
"addStyleCatAssignment");
 
 1202                 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
 
 1204                 include_once(
"./Services/Style/classes/class.ilSysStyleCatAssignmentTableGUI.php");
 
 1207                 $tpl->setContent(
$tab->getHTML());
 
 1221                 if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId()))
 
 1226                 $ilCtrl->setParameter($this, 
"style_id", urlencode(
$_GET[
"style_id"]));
 
 1227                 $ilCtrl->setParameter($this, 
"substyle", urlencode(
$_REQUEST[
"substyle"]));
 
 1229                 include_once 
'Services/Search/classes/class.ilSearchRootSelector.php';
 
 1231                         $ilCtrl->getLinkTarget($this,
'addStyleCatAssignment'));
 
 1232                 $exp->
setExpand(
$_GET[
"search_root_expand"] ? 
$_GET[
"search_root_expand"] : $tree->readRootId());
 
 1233                 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'addStyleCatAssignment'));
 
 1234                 $exp->setTargetClass(get_class($this));
 
 1235                 $exp->setCmd(
'saveStyleCatAssignment');
 
 1236                 $exp->setClickableTypes(array(
"cat"));
 
 1240                 $tpl->setContent($exp->getOutput());
 
 1254                 if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId()))
 
 1259                 $ilCtrl->setParameter($this, 
"style_id", urlencode(
$_GET[
"style_id"]));
 
 1261                 $style_arr = explode(
":", 
$_GET[
"style_id"]);
 
 1266                 $ilCtrl->redirect($this, 
"assignStylesToCats");
 
 1276                 if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId()))
 
 1281                 $ilCtrl->setParameter($this, 
"style_id", urlencode(
$_GET[
"style_id"]));
 
 1282                 $style_arr = explode(
":", 
$_GET[
"style_id"]);
 
 1283                 if (is_array(
$_POST[
"id"]))
 
 1285                         foreach (
$_POST[
"id"] as $id)
 
 1287                                 $id_arr = explode(
":", $id);
 
 1289                                         $id_arr[0], $id_arr[1]);
 
 1294                 $ilCtrl->redirect($this, 
"assignStylesToCats");