ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjStyleSettingsGUI Class Reference

Class ilO bjStyleSettingsGUI. More...

+ Inheritance diagram for ilObjStyleSettingsGUI:
+ Collaboration diagram for ilObjStyleSettingsGUI:

Public Member Functions

 ilObjStyleSettingsGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
executeCommand ()
 execute command
 saveObject ()
 save object public
 editBasicSettingsObject ()
 edit basic style settings
 saveBasicStyleSettingsObject ()
 save basic style settings
 editContentStylesObject ()
 view list of styles
 moveLMStylesObject ()
 move learning modules from one style to another
 moveIndividualStylesObject ()
 move all learning modules with individual styles to new style
 confirmDeleteIndividualStyles ()
 confirmation screen change (delete) individual styles
 editSystemStylesObject ()
 edit system styles
 saveStyleSettingsObject ()
 save skin and style settings
 deleteStyleObject ($a_error=false)
 display deletion confirmation screen
 confirmedDeleteObject ()
 delete selected style objects
 toggleGlobalDefaultObject ()
 toggle global default style
 toggleGlobalFixedObject ()
 toggle global fixed style
 saveActiveStylesObject ()
 save active styles
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 cancelDeleteObject ()
 cancel deletion of object
 setScopeObject ()
 saveScopeObject ()
 save scope for style
 viewPageLayoutsObject ()
 view list of page layouts
 activateObject ($a_activate=true)
 deactivateObject ()
 deletePglObject ()
 display deletion confirmation screen
 cancelDeletePgObject ()
 cancel deletion of Page Layout
 confirmedDeletePgObject ()
 conform deletion of Page Layout
 createPgGUIObject ()
 createPgObject ()
 cancelCreateObject ()
 editPgObject ()
 setTabs ()
 set admin tabs public
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getTabs (&$tabs_gui)
 get tabs public
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 createObject ()
 create new object form
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.

Data Fields

 $peditor_active = false
 Constructor public.
 $pg_id = null
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showClipboardTable ($a_result_set, $a_from="")
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Detailed Description

Class ilO bjStyleSettingsGUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilObjStyleSettingsGUI.php 27550 2011-01-26 16:36:29Z hschottm

ilObjStyleSettingsGUI: ilPermissionGUI, ilPageLayoutGUI

Definition at line 19 of file class.ilObjStyleSettingsGUI.php.

Member Function Documentation

ilObjStyleSettingsGUI::activateObject (   $a_activate = true)

Definition at line 1034 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilUtil\sendInfo(), and ilUtil\sendSuccess().

Referenced by deactivateObject().

{
if (!isset($_POST["pglayout"]))
{
ilUtil::sendInfo($this->lng->txt("no_checkbox"),true);
} else {
ilUtil::sendSuccess($this->lng->txt("sty_opt_saved"),true);
foreach ($_POST["pglayout"] as $item)
{
$pg_layout = new ilPageLayout($item);
$pg_layout->activate($a_activate);
}
}
$this->ctrl->redirect($this, "viewPageLayouts");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::cancelCreateObject ( )

Definition at line 1274 of file class.ilObjStyleSettingsGUI.php.

References viewPageLayoutsObject().

{
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::cancelDeleteObject ( )

cancel deletion of object

public

Reimplemented from ilObjectGUI.

Definition at line 941 of file class.ilObjStyleSettingsGUI.php.

References ilUtil\sendInfo().

{
session_unregister("saved_post");
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "editContentStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::cancelDeletePgObject ( )

cancel deletion of Page Layout

Definition at line 1147 of file class.ilObjStyleSettingsGUI.php.

References ilUtil\sendInfo().

{
session_unregister("pglayout_user_delete");
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "viewPageLayouts");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::confirmDeleteIndividualStyles ( )

confirmation screen change (delete) individual styles

Definition at line 468 of file class.ilObjStyleSettingsGUI.php.

References $_POST, and ilObject\_lookupTitle().

Referenced by moveLMStylesObject().

{
// load template content style settings
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.confirm.html");
$this->tpl->setVariable("CMD_OK", "moveIndividualStyles");
$this->tpl->setVariable("TXT_OK", $this->lng->txt("ok"));
$this->tpl->setVariable("CMD_CANCEL", "editContentStyles");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt("sty_confirm_del_ind_styles"));
$this->tpl->setVariable("TXT_CONTENT",
sprintf($this->lng->txt("sty_confirm_del_ind_styles_desc"),
$this->ctrl->setParameter($this, "to_style", $_POST["to_style"]);
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormaction($this));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::confirmedDeleteObject ( )

delete selected style objects

Reimplemented from ilObjectGUI.

Definition at line 784 of file class.ilObjStyleSettingsGUI.php.

References $_SESSION, ilObjectGUI\$ilias, ilObjectGUI\getReturnLocation(), and ilUtil\redirect().

{
global $ilias;
foreach($_SESSION["saved_post"] as $id)
{
$this->object->removeStyle($id);
$style_obj =& $ilias->obj_factory->getInstanceByObjId($id);
$style_obj->delete();
}
$this->object->update();
$this->ctrl->getLinkTarget($this,"editContentStyles","",false,false)));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::confirmedDeletePgObject ( )

conform deletion of Page Layout

Definition at line 1158 of file class.ilObjStyleSettingsGUI.php.

References $_SESSION, and $ilDB.

{
global $ilDB, $ilUser;
foreach ($_SESSION["pglayout_user_delete"] as $id)
{
$pg_obj = new ilPageLayout($id);
$pg_obj->delete();
}
$this->ctrl->redirect($this, "viewPageLayouts");
}
ilObjStyleSettingsGUI::createPgGUIObject ( )

Definition at line 1174 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilPageLayout\getLayouts(), ilTextInputGUI\setSize(), and ilTextAreaInputGUI\setValue().

Referenced by createPgObject().

{
global $ilCtrl, $lng, $ilTabs;
$ilTabs->setTabActive('page_layouts');
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setFormAction($ilCtrl->getFormAction($this));
$this->form_gui->setTitle($lng->txt("sty_create_pgl"));
include_once("Services/Form/classes/class.ilRadioMatrixInputGUI.php");
$title_input = new ilTextInputGUI($lng->txt("title"),"pgl_title");
$title_input->setSize(50);
$title_input->setMaxLength(128);
$title_input->setValue($this->layout_object->title);
$title_input->setTitle($lng->txt("title"));
$title_input->setRequired(true);
$desc_input = new ilTextAreaInputGUI($lng->txt("description"),"pgl_desc");
$desc_input->setValue($this->layout_object->description);
$desc_input->setRows(3);
$desc_input->setCols(37);
$ttype_input = new ilSelectInputGUI($lng->txt("sty_based_on"), "pgl_template");
$arr_templates = ilPageLayout::getLayouts();
$options = array();
$options['-1'] = $lng->txt("none");
foreach ($arr_templates as $templ) {
$templ->readObject();
$key = $templ->getId();
$value = $templ->getTitle();
$options[$key] = $value;
}
$ttype_input->setOptions($options);
$ttype_input->setValue(-1);
$ttype_input->setRequired(true);
$desc_input->setTitle($lng->txt("description"));
$desc_input->setRequired(false);
$this->form_gui->addItem($title_input);
$this->form_gui->addItem($desc_input);
$this->form_gui->addItem($ttype_input);
$this->form_gui->addCommandButton("createPg", $lng->txt("save"));
$this->form_gui->addCommandButton("cancelCreate", $lng->txt("cancel"));
$this->tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::createPgObject ( )

Definition at line 1233 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $ilCtrl, createPgGUIObject(), executeCommand(), and exit.

{
global $ilCtrl;
if($_POST["pgl_title"] == "")
{
$this->ilias->raiseError($this->lng->txt("no_title"),$this->ilias->error_obj->MESSAGE);
}
//create Page-Layout-Object first
$pg_object = new ilPageLayout();
$pg_object->setTitle($_POST['pgl_title']);
$pg_object->setDescription($_POST['pgl_desc']);
$pg_object->update();
include_once("./Services/COPage/classes/class.ilPageObject.php");
//create Page
if(!is_object($pg_content))
{
$this->pg_content =& new ilPageObject($this->type);
}
$this->pg_content->setId($pg_object->getId());
if ($_POST['pgl_template'] != "-1") {
$layout_obj = new ilPageLayout($_POST['pgl_template']);
$this->pg_content->setXMLContent($layout_obj->getXMLContent());
$this->pg_content->create(false);
} else {
$this->pg_content->create(false);
}
$this->pg_id = $pg_object->getId();
$ilCtrl->setCmdClass("ilpagelayoutgui");
$ilCtrl->setCmd("edit");
$this->executeCommand();
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::deactivateObject ( )

Definition at line 1049 of file class.ilObjStyleSettingsGUI.php.

References activateObject().

{
$this->activateObject(false);
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::deletePglObject ( )

display deletion confirmation screen

Definition at line 1058 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $_SESSION, $name, ilUtil\getImageTagByType(), ilObjectGUI\getTemplateFile(), ilUtil\sendInfo(), and ilUtil\switchColor().

{
global $ilTabs;
if(!isset($_POST["pglayout"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
$ilTabs->setTabActive('page_layouts');
// SAVE POST VALUES
$_SESSION["pglayout_user_delete"] = $_POST["pglayout"];
unset($this->data);
$this->data["cols"] = array("type","title");
foreach($_POST["pglayout"] as $id)
{
$pg_obj = new ilPageLayout($id);
$pg_obj->readObject();
$this->data["data"]["$id"] = array(
"type" => "stys",
"title" => $pg_obj->getTitle()
);
}
$this->data["buttons"] = array( "cancelDeletePg" => $this->lng->txt("cancel"),
"confirmedDeletePg" => $this->lng->txt("confirm"));
$this->getTemplateFile("confirm");
ilUtil::sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
// BEGIN TABLE HEADER
foreach ($this->data["cols"] as $key)
{
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT",$this->lng->txt($key));
$this->tpl->parseCurrentBlock();
}
// END TABLE HEADER
// BEGIN TABLE DATA
$counter = 0;
foreach($this->data["data"] as $key => $value)
{
// BEGIN TABLE CELL
foreach($value as $key => $cell_data)
{
$this->tpl->setCurrentBlock("table_cell");
// CREATE TEXT STRING
if($key == "type")
{
$this->tpl->setVariable("TEXT_CONTENT",ilUtil::getImageTagByType($cell_data,$this->tpl->tplPath));
}
else
{
$this->tpl->setVariable("TEXT_CONTENT",$cell_data);
}
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->parseCurrentBlock();
// END TABLE CELL
}
// END TABLE DATA
// BEGIN OPERATION_BTN
foreach($this->data["buttons"] as $name => $value)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME",$name);
$this->tpl->setVariable("BTN_VALUE",$value);
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::deleteStyleObject (   $a_error = false)

display deletion confirmation screen

public

Definition at line 727 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $_SESSION, $name, ilObject\_lookupTitle(), ilUtil\getImagePath(), ilUtil\sendInfo(), and ilUtil\switchColor().

{
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// SAVE POST VALUES
$_SESSION["saved_post"] = $_POST["id"];
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.confirm_deletion.html");
if(!$a_error)
{
ilUtil::sendInfo($this->lng->txt("info_delete_sure"));
}
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// BEGIN TABLE HEADER
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT", $this->lng->txt("objects"));
$this->tpl->parseCurrentBlock();
// END TABLE HEADER
// BEGIN TABLE DATA
$counter = 0;
foreach ($_POST["id"] as $id)
{
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("IMG_OBJ",ilUtil::getImagePath("icon_sty.gif"));
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->setVariable("TEXT_CONTENT",ilObject::_lookupTitle($id));
$this->tpl->parseCurrentBlock();
}
// END TABLE DATA
// BEGIN OPERATION_BTN
$buttons = array("confirmedDelete" => $this->lng->txt("confirm"),
"cancelDelete" => $this->lng->txt("cancel"));
foreach ($buttons as $name => $value)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->setVariable("BTN_NAME",$name);
$this->tpl->setVariable("BTN_VALUE",$value);
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::editBasicSettingsObject ( )

edit basic style settings

Definition at line 120 of file class.ilObjStyleSettingsGUI.php.

{
global $rbacsystem;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->tpl->addBlockfile("ADM_CONTENT", "style_basic_settings", "tpl.stys_basic_settings.html");
//$this->tpl->setCurrentBlock("style_settings");
$settings = $this->ilias->getAllSettings();
$this->tpl->setVariable("FORMACTION_STYLESETTINGS", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_TREE_FRAME", $this->lng->txt("tree_frame"));
$this->tpl->setVariable("TXT_TREE_FRAME_INFO", $this->lng->txt("tree_frame_info"));
$this->tpl->setVariable("TXT_FRAME_LEFT", $this->lng->txt("tree_left"));
$this->tpl->setVariable("TXT_FRAME_RIGHT", $this->lng->txt("tree_right"));
$this->tpl->setVariable("TXT_STYLE_SETTINGS", $this->lng->txt("basic_settings"));
$this->tpl->setVariable("TXT_ICONS_IN_TYPED_LISTS", $this->lng->txt("icons_in_typed_lists"));
$this->tpl->setVariable("TXT_ICONS_IN_HEADER", $this->lng->txt("icons_in_header"));
$this->tpl->setVariable("TXT_ICONS_IN_ITEM_ROWS", $this->lng->txt("icons_in_item_rows"));
$this->tpl->setVariable("TXT_ICONS_IN_TYPED_LISTS_INFO", $this->lng->txt("icons_in_typed_lists_info"));
$this->tpl->setVariable("TXT_ENABLE_CUSTOM_ICONS", $this->lng->txt("enable_custom_icons"));
$this->tpl->setVariable("TXT_ENABLE_CUSTOM_ICONS_INFO", $this->lng->txt("enable_custom_icons_info"));
$this->tpl->setVariable("TXT_CUSTOM_ICON_SIZE_BIG", $this->lng->txt("custom_icon_size_big"));
$this->tpl->setVariable("TXT_CUSTOM_ICON_SIZE_SMALL", $this->lng->txt("custom_icon_size_standard"));
$this->tpl->setVariable("TXT_CUSTOM_ICON_SIZE_TINY", $this->lng->txt("custom_icon_size_tiny"));
$this->tpl->setVariable("TXT_WIDTH_X_HEIGHT", $this->lng->txt("width_x_height"));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
// set current values
if ($settings["tree_frame"] == "right")
{
$this->tpl->setVariable("SEL_FRAME_RIGHT","selected=\"selected\"");
}
else
{
$this->tpl->setVariable("SEL_FRAME_LEFT","selected=\"selected\"");
}
if ($settings["custom_icons"])
{
$this->tpl->setVariable("CHK_CUSTOM_ICONS","checked=\"checked\"");
}
/* if ($settings["icon_position_in_lists"] == "item_rows")
{
$this->tpl->setVariable("SEL_ICON_POS_ITEM_ROWS","selected=\"selected\"");
}
else
{
$this->tpl->setVariable("SEL_ICON_POS_HEADER","selected=\"selected\"");
}*/
$this->tpl->setVariable("CUST_ICON_BIG_WIDTH", $settings["custom_icon_big_width"]);
$this->tpl->setVariable("CUST_ICON_BIG_HEIGHT", $settings["custom_icon_big_height"]);
$this->tpl->setVariable("CUST_ICON_SMALL_WIDTH", $settings["custom_icon_small_width"]);
$this->tpl->setVariable("CUST_ICON_SMALL_HEIGHT", $settings["custom_icon_small_height"]);
$this->tpl->setVariable("CUST_ICON_TINY_WIDTH", $settings["custom_icon_tiny_width"]);
$this->tpl->setVariable("CUST_ICON_TINY_HEIGHT", $settings["custom_icon_tiny_height"]);
// $this->tpl->parseCurrentBlock();
}
ilObjStyleSettingsGUI::editContentStylesObject ( )

view list of styles

Definition at line 208 of file class.ilObjStyleSettingsGUI.php.

References $_GET, ilObjectGUI\$ilias, ilObjContentObject\_getNrLMsIndividualStyles(), ilObjContentObject\_getNrLMsNoStyle(), ilObjContentObject\_getNrOfAssignedLMs(), ilObjStyleSheet\_lookupActive(), ilObject\_lookupDescription(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilUtil\formSelect(), and showActions().

{
global $rbacsystem, $ilias;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
include_once "./Services/Table/classes/class.ilTableGUI.php";
// load template content style settings
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.styf_content_styles.html");
// load template for table
$this->tpl->addBlockfile("STYLE_TABLE", "style_table", "tpl.table.html");
// load template for table content data
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.styf_row.html");
$num = 0;
$this->tpl->setVariable("FORMACTION",
$this->ctrl->getFormAction($this));
// create table
$tbl = new ilTableGUI();
// title & header columns
$tbl->setTitle($this->lng->txt("content_styles"),"icon_sty.gif",
$this->lng->txt("content_styles"));
//$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
// title
$header_names = array("", $this->lng->txt("title"),
$this->lng->txt("sty_nr_learning_modules"),
$this->lng->txt("purpose"), $this->lng->txt("sty_scope"),
$this->lng->txt("active"));
$tbl->setHeaderNames($header_names);
$header_params = array("ref_id" => $this->ref_id);
$tbl->setHeaderVars(array("", "title", "nr_lms", "purpose", "scope", "active"), $header_params);
$tbl->setColumnWidth(array("1px", "", "", "", ""));
// control
$tbl->setOrderColumn($_GET["sort_by"]);
$tbl->setOrderDirection($_GET["sort_order"]);
$tbl->setLimit($_GET["limit"]);
$tbl->setOffset($_GET["offset"]);
$tbl->disable("sort");
// get style ids
$style_entries = array();
$styles = $this->object->getStyles();
foreach($styles as $style)
{
$style_entries[$style["title"].":".$style["id"]]
= $style;
}
ksort($style_entries);
$from_styles = $to_styles = array();
// this may not be cool, if styles are organised as (independent) Service
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
// number of individual styles
if ($fixed_style <= 0)
{
$style_entries[-1] =
array("title" => $this->lng->txt("sty_individual_styles"),
$from_styles[-1] = $this->lng->txt("sty_individual_styles");
}
// number of default style (fallback default style)
if ($default_style <= 0 && $fixed_style <= 0)
{
$style_entries[0] =
array("title" => $this->lng->txt("sty_default_style"),
"id" => 0, "nr" => ilObjContentObject::_getNrLMsNoStyle());
$from_styles[0] = $this->lng->txt("sty_default_style");
$to_styles[0] = $this->lng->txt("sty_default_style");
}
// todo
$tbl->setMaxCount(count($style_entries));
$this->tpl->setVariable("COLUMN_COUNTS", 6);
// footer
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
$this->showActions(true);
$table_empty = true;
include_once ("./Services/Style/classes/class.ilObjStyleSheet.php");
$fixed_style = $ilias->getSetting("fixed_content_style_id");
$default_style = $ilias->getSetting("default_content_style_id");
foreach ($style_entries as $style)
{
// color changing
$css_row = ($css_row == "tblrow2")
? "tblrow1"
: "tblrow2";
// command checkbox
if ($style["id"] > 0)
{
$this->tpl->setCurrentBlock("check_box");
$this->tpl->setVariable("CHECKBOX_ID", $style["id"]);
$this->tpl->parseCurrentBlock();
}
// activation checkbox
if ($fixed_style <= 0 && $style["id"] > 0)
{
$this->tpl->setCurrentBlock("active_box");
if (ilObjStyleSheet::_lookupActive($style["id"]))
{
$this->tpl->setVariable("CHECKED_STY", 'checked="checked"');
}
$this->tpl->setVariable("ACTIVE_ID", $style["id"]);
$this->tpl->parseCurrentBlock();
}
// link to style edit screen
if ($style["id"] > 0)
{
$this->ctrl->setParameterByClass("ilobjstylesheetgui", "obj_id", $style["id"]);
$this->tpl->setCurrentBlock("linka");
$this->tpl->setVariable("TXT_TITLE", $style["title"]);
$this->tpl->setVariable("LINK_STYLE",
$this->ctrl->getLinkTargetByClass("ilobjstylesheetgui"), "view");
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("texta");
$this->tpl->setVariable("TXT_TEXT", $style["title"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("style_row");
// number of assigned lms
if ($style["id"] > 0)
{
// fill from/to array
if ($nr_lm > 0)
{
$from_styles[$style["id"]] = $style["title"];
}
if (ilObjStyleSheet::_lookupActive($style["id"]))
{
$to_styles[$style["id"]] = $style["title"];
}
$this->tpl->setVariable("TXT_NR_LEARNING_MODULES", $nr_lm);
$this->tpl->setVariable("TXT_DESC", ilObject::_lookupDescription($style["id"]));
}
else
{
$this->tpl->setVariable("TXT_NR_LEARNING_MODULES", $style["nr"]);
}
$this->tpl->setVariable("ROWCOL", $css_row);
// purpose and scope
if ($style["id"] > 0)
{
if ($style["id"] == $fixed_style)
{
$this->tpl->setVariable("TXT_PURPOSE", $this->lng->txt("global_fixed"));
}
if ($style["id"] == $default_style)
{
$this->tpl->setVariable("TXT_PURPOSE", $this->lng->txt("global_default"));
}
if ($style["category"] > 0)
{
$this->tpl->setVariable("TXT_SCOPE",
ilObject::_lookupObjId($style["category"])
));
}
}
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->parseCurrentBlock();
} //if is_array
if (count($style_entries) == 0)
{
$tbl->disable("header");
$tbl->disable("footer");
$this->tpl->setCurrentBlock("text");
$this->tpl->setVariable("TXT_CONTENT", $this->lng->txt("obj_not_found"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->parseCurrentBlock();
}
// render table
$tbl->render();
// move form
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("TXT_MOVE_LM_STYLE", $this->lng->txt("sty_move_lm_styles"));
$this->tpl->setVariable("TXT_FROM", $this->lng->txt("from"));
$this->tpl->setVariable("TXT_TO", $this->lng->txt("to"));
$this->tpl->setVariable("TXT_MOVE_LM_STYLE", $this->lng->txt("sty_move_lm_styles"));
$this->tpl->setVariable("TXT_MOVE_STYLE", $this->lng->txt("sty_move_style"));
$this->tpl->setVariable("SELECT_FROM",
ilUtil::formSelect("", "from_style", $from_styles, false, true));
$this->tpl->setVariable("SELECT_TO",
ilUtil::formSelect("", "to_style", $to_styles, false, true));
$this->tpl->setVariable("FORMACTION2", $this->ctrl->getFormAction($this));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::editPgObject ( )

Definition at line 1278 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, and executeCommand().

{
global $ilCtrl;
$ilCtrl->setCmdClass("ilpagelayoutgui");
$ilCtrl->setCmd("edit");
$this->executeCommand();
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::editSystemStylesObject ( )

edit system styles

Definition at line 489 of file class.ilObjStyleSettingsGUI.php.

References ilObjectGUI\$ilias, ilObjUser\_getAllUserAssignedStyles(), ilObjUser\_getNumberOfUsersForStyle(), and ilObjStyleSettings\_lookupActivatedStyle().

{
global $rbacsystem, $ilias, $styleDefinition;;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->tpl->addBlockfile("ADM_CONTENT", "style_settings", "tpl.stys_settings.html");
$this->tpl->setCurrentBlock("style_settings");
$settings = $this->ilias->getAllSettings();
$this->tpl->setVariable("FORMACTION_STYLESETTINGS", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_STYLE_SETTINGS", $this->lng->txt("system_style_settings"));
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->tpl->setVariable("TXT_DEFAULT_SKIN_STYLE", $this->lng->txt("default_skin_style"));
$this->tpl->setVariable("TXT_SKIN_STYLE_ACTIVATION", $this->lng->txt("style_activation"));
$this->tpl->setVariable("TXT_NUMBER_OF_USERS", $this->lng->txt("num_users"));
$this->tpl->setVariable("TXT_MOVE_USERS_TO_STYLE", $this->lng->txt("move_users_to_style"));
// get all templates
$templates = $styleDefinition->getAllTemplates();
$all_styles = array();
foreach ($templates as $template)
{
// get styles definition for template
$styleDef =& new ilStyleDefinition($template["id"]);
$styleDef->startParsing();
$styles = $styleDef->getStyles();
foreach ($styles as $style)
{
if ($this->ilias->ini->readVariable("layout","skin") == $template["id"] &&
$this->ilias->ini->readVariable("layout","style") == $style["id"])
{
$this->tpl->setVariable("SKINSELECTED", "selected=\"selected\"");
}
// default selection list
$this->tpl->setCurrentBlock("selectskin");
$this->tpl->setVariable("SKINVALUE", $template["id"].":".$style["id"]);
$this->tpl->setVariable("SKINOPTION", $styleDef->getTemplateName()." / ".$style["name"]);
$this->tpl->parseCurrentBlock();
// can be optimized
foreach ($templates as $template2)
{
// get styles definition for template
$styleDef2 =& new ilStyleDefinition($template2["id"]);
$styleDef2->startParsing();
$styles2 = $styleDef2->getStyles();
foreach ($styles2 as $style2)
{
if (ilObjStyleSettings::_lookupActivatedStyle($template2["id"], $style2["id"]))
{
$this->tpl->setCurrentBlock("move_to_skin");
$this->tpl->setVariable("TOSKINVALUE", $template2["id"].":".$style2["id"]);
$this->tpl->setVariable("TOSKINOPTION", $styleDef2->getTemplateName()." / ".$style2["name"]);
$this->tpl->parseCurrentBlock();
}
}
}
// activation checkbox
$this->tpl->setCurrentBlock("activation_checkbox");
$this->tpl->setVariable("VAL_SKIN_STYLE", $template["id"].":".$style["id"]);
if (ilObjStyleSettings::_lookupActivatedStyle($template["id"], $style["id"]))
{
$this->tpl->setVariable("CHK_SKIN_STYLE", " checked=\"1\" ");
}
$this->tpl->parseCurrentBlock();
// activation row
$this->tpl->setCurrentBlock("style_activation");
$this->tpl->setVariable("VAL_MOVE_SKIN_STYLE", $template["id"].":".$style["id"]);
$this->tpl->setVariable("TXT_SKIN_STYLE_TITLE",
$styleDef->getTemplateName()." / ".$style["name"]);
$num_users = ilObjUser::_getNumberOfUsersForStyle($template["id"], $style["id"]);
$this->tpl->setVariable("VAL_NUM_USERS", $num_users);
$this->tpl->parseCurrentBlock();
$all_styles[] = $template["id"].":".$style["id"];
}
}
// get all user assigned styles
// output "other" row for all users, that are not assigned to
// any existing style
$users_missing_styles = 0;
foreach($all_user_styles as $style)
{
if (!in_array($style, $all_styles))
{
$style_arr = explode(":", $style);
$users_missing_styles += ilObjUser::_getNumberOfUsersForStyle($style_arr[0], $style_arr[1]);
}
}
if ($users_missing_styles > 0)
{
// can be optimized
foreach ($templates as $template2)
{
// get styles definition for template
$styleDef2 =& new ilStyleDefinition($template2["id"]);
$styleDef2->startParsing();
$styles2 = $styleDef2->getStyles();
foreach ($styles2 as $style2)
{
if (ilObjStyleSettings::_lookupActivatedStyle($template2["id"], $style2["id"]))
{
$this->tpl->setCurrentBlock("move_to_skin");
$this->tpl->setVariable("TOSKINVALUE", $template2["id"].":".$style2["id"]);
$this->tpl->setVariable("TOSKINOPTION", $styleDef2->getTemplateName()." / ".$style2["name"]);
$this->tpl->parseCurrentBlock();
}
}
}
$this->tpl->setCurrentBlock("style_activation");
$this->tpl->setVariable("TXT_SKIN_STYLE_TITLE",
$this->lng->txt("other"));
$this->tpl->setVariable("VAL_NUM_USERS",
$users_missing_styles);
$this->tpl->setVariable("VAL_MOVE_SKIN_STYLE", "other");
$this->tpl->parseCurrentBlock();
}
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

& ilObjStyleSettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 49 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $cmd, $ret, and ilObjectGUI\prepareOutput().

Referenced by createPgObject(), and editPgObject().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
if ($next_class == "ilpagelayoutgui" || $cmd =="createPg") {
$this->peditor_active =true;
}
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilpagelayoutgui':
include_once("./Services/Style/classes/class.ilPageLayoutGUI.php");
$this->tpl->getStandardTemplate();
$this->ctrl->setReturn($this, "edit");
if ($this->pg_id!=null) {
$layout_gui =& new ilPageLayoutGUI($this->type,$this->pg_id);
} else {
$layout_gui =& new ilPageLayoutGUI($this->type,$_GET["obj_id"]);
}
$layout_gui->setTabs();
$layout_gui->setEditPreview(true);
$this->ctrl->saveParameter($this, "obj_id");
$ret =& $this->ctrl->forwardCommand($layout_gui);
$this->tpl->setContent($ret);
break;
default:
if ($cmd == "" || $cmd == "view")
{
$cmd = "editBasicSettings";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 1293 of file class.ilObjStyleSettingsGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 1303 of file class.ilObjStyleSettingsGUI.php.

References ilObjectGUI\$lng.

Referenced by getAdminTabs().

{
global $rbacsystem, $lng, $ilTabs;
if ($this->peditor_active) {
$tabs_gui->setBackTarget($this->lng->txt("page_layouts"),
$this->ctrl->getLinkTarget($this, "viewPageLayouts"));
}
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()) && !$this->peditor_active)
{
$tabs_gui->addTarget("basic_settings",
$this->ctrl->getLinkTarget($this, "editBasicSettings"), array("editBasicSettings","", "view"), "", "");
$tabs_gui->addTarget("system_styles",
$this->ctrl->getLinkTarget($this, "editSystemStyles"), "editSystemStyles", "", "");
$tabs_gui->addTarget("content_styles",
$this->ctrl->getLinkTarget($this, "editContentStyles"), "editContentStyles", "", "");
$tabs_gui->addTarget("page_layouts",
$this->ctrl->getLinkTarget($this, "viewPageLayouts"), "viewPageLayouts", "", "");
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()) && !$this->peditor_active)
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::ilObjStyleSettingsGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Definition at line 32 of file class.ilObjStyleSettingsGUI.php.

References $cmd, $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

{
global $lng,$ilCtrl;
$this->type = "stys";
$cmd = $ilCtrl->getCmd();
if ($cmd == "editPg") {
$this->peditor_active = true;
}
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
$lng->loadLanguageModule("style");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::moveIndividualStylesObject ( )

move all learning modules with individual styles to new style

Definition at line 457 of file class.ilObjStyleSettingsGUI.php.

References $_GET, and ilObjContentObject\_moveLMStyles().

{
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
$this->ctrl->redirect($this, "editContentStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::moveLMStylesObject ( )

move learning modules from one style to another

Definition at line 440 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjContentObject\_moveLMStyles(), and confirmDeleteIndividualStyles().

{
if ($_POST["from_style"] == -1)
{
return;
}
include_once("./Modules/LearningModule/classes/class.ilObjContentObject.php");
ilObjContentObject::_moveLMStyles($_POST["from_style"], $_POST["to_style"]);
$this->ctrl->redirect($this, "editContentStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveActiveStylesObject ( )

save active styles

Definition at line 869 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjStyleSheet\_writeActive(), and ilUtil\redirect().

{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$styles = $this->object->getStyles();
foreach($styles as $style)
{
if ($_POST["std_".$style["id"]] == 1)
{
}
else
{
}
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveBasicStyleSettingsObject ( )

save basic style settings

Definition at line 190 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilUtil\redirect(), and ilUtil\sendSuccess().

{
$this->ilias->setSetting("tree_frame", $_POST["tree_frame"]);
// $this->ilias->setSetting("icon_position_in_lists", $_POST["icon_position_in_lists"]);
$this->ilias->setSetting("custom_icons", $_POST["custom_icons"]);
$this->ilias->setSetting("custom_icon_big_width", (int) $_POST["custom_icon_big_width"]);
$this->ilias->setSetting("custom_icon_big_height", (int) $_POST["custom_icon_big_height"]);
$this->ilias->setSetting("custom_icon_small_width", (int) $_POST["custom_icon_small_width"]);
$this->ilias->setSetting("custom_icon_small_height", (int) $_POST["custom_icon_small_height"]);
$this->ilias->setSetting("custom_icon_tiny_width", (int) $_POST["custom_icon_tiny_width"]);
$this->ilias->setSetting("custom_icon_tiny_height", (int) $_POST["custom_icon_tiny_height"]);
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
ilUtil::redirect($this->ctrl->getLinkTarget($this,"editBasicSettings","",false,false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveObject ( )

save object public

Reimplemented from ilObjectGUI.

Definition at line 102 of file class.ilObjStyleSettingsGUI.php.

References ilObjectGUI\getReturnLocation(), ilUtil\redirect(), and ilUtil\sendInfo().

{
global $rbacadmin;
// create and insert object in objecttree
$newObj = parent::saveObject();
// put here object specific stuff
// always send a message
ilUtil::sendInfo($this->lng->txt("object_added"),true);
ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"","",false,false)));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveScopeObject ( )

save scope for style

Definition at line 991 of file class.ilObjStyleSettingsGUI.php.

References $_GET, ilObjectGUI\$ilias, ilObjStyleSheet\_writeScope(), and ilUtil\redirect().

{
global $ilias;
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
if ($_GET["cat"] == 0)
{
$_GET["cat"] == "";
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::saveStyleSettingsObject ( )

save skin and style settings

Definition at line 632 of file class.ilObjStyleSettingsGUI.php.

References $_POST, $ilCtrl, ilObjStyleSettings\_activateStyle(), ilObjStyleSettings\_deactivateStyle(), ilObjUser\_getAllUserAssignedStyles(), ilObjUser\_getNumberOfUsersForStyle(), ilObjUser\_moveUsersToStyle(), and ilUtil\sendInfo().

{
global $styleDefinition, $ilCtrl;
// check if one style is activated
if (count($_POST["st_act"]) < 1)
{
$this->ilias->raiseError($this->lng->txt("at_least_one_style"), $this->ilias->error_obj->MESSAGE);
}
// check if a style should be deactivated, that still has
// a user assigned to
$templates = $styleDefinition->getAllTemplates();
$all_styles = array();
foreach ($templates as $template)
{
// get styles definition for template
$styleDef =& new ilStyleDefinition($template["id"]);
$styleDef->startParsing();
$styles = $styleDef->getStyles();
foreach ($styles as $style)
{
if (!isset($_POST["st_act"][$template["id"].":".$style["id"]]))
{
if (ilObjUser::_getNumberOfUsersForStyle($template["id"], $style["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cant_deactivate_if_users_assigned"), $this->ilias->error_obj->MESSAGE);
}
else
{
ilObjStyleSettings::_deactivateStyle($template["id"], $style["id"]);
}
}
else
{
ilObjStyleSettings::_activateStyle($template["id"], $style["id"]);
}
$all_styles[] = $template["id"].":".$style["id"];
}
}
// move users to other skin
foreach($_POST["move_users"] as $key => $value)
{
if ($value != "")
{
$to = explode(":", $value);
if ($key != "other")
{
$from = explode(":", $key);
ilObjUser::_moveUsersToStyle($from[0],$from[1],$to[0],$to[1]);
}
else
{
// get all user assigned styles
// move users that are not assigned to
// currently existing style
foreach($all_user_styles as $style)
{
if (!in_array($style, $all_styles))
{
$style_arr = explode(":", $style);
ilObjUser::_moveUsersToStyle($style_arr[0],$style_arr[1],$to[0],$to[1]);
}
}
}
}
}
//set default skin and style
if ($_POST["default_skin_style"] != "")
{
$sknst = explode(":", $_POST["default_skin_style"]);
if ($this->ilias->ini->readVariable("layout","style") != $sknst[1] ||
$this->ilias->ini->readVariable("layout","skin") != $sknst[0])
{
$this->ilias->ini->setVariable("layout","skin", $sknst[0]);
$this->ilias->ini->setVariable("layout","style",$sknst[1]);
}
}
$this->ilias->ini->write();
ilUtil::sendInfo($this->lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this , "editSystemStyles");
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::setScopeObject ( )

Definition at line 950 of file class.ilObjStyleSettingsGUI.php.

References $_GET, $_POST, and IL_FM_POSITIVE.

{
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
//$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.confirm_deletion.html");
//$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.explorer.html");
include_once ("./Services/Style/classes/class.ilStyleScopeExplorer.php");
$exp = new ilStyleScopeExplorer("repository.php?cmd=goto");
$exp->setExpandTarget("repository.php?cmd=showTree");
$exp->setTargetGet("ref_id");
$exp->setFilterMode(IL_FM_POSITIVE);
$exp->forceExpandAll(true, false);
$exp->addFilter("root");
$exp->addFilter("cat");
if ($_GET["expand"] == "")
{
$expanded = $this->tree->readRootId();
}
else
{
$expanded = $_GET["expand"];
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable("ADM_CONTENT", $output);
}
ilObjStyleSettingsGUI::setTabs ( )

set admin tabs public

Reimplemented from ilObjectGUI.

Definition at line 1288 of file class.ilObjStyleSettingsGUI.php.

{
echo "settings_setTabs";
}
ilObjStyleSettingsGUI::showActions (   $with_subobjects = false)

show possible action (form buttons)

Parameters
booleanpublic

Definition at line 893 of file class.ilObjStyleSettingsGUI.php.

References ilUtil\getImagePath(), and ilObjectGUI\showPossibleSubObjects().

Referenced by editContentStylesObject().

{
// delete
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "deleteStyle");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
// set global default
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "toggleGlobalDefault");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("toggleGlobalDefault"));
$this->tpl->parseCurrentBlock();
// set global default
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "toggleGlobalFixed");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("toggleGlobalFixed"));
$this->tpl->parseCurrentBlock();
// set global default
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "setScope");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("sty_set_scope"));
$this->tpl->parseCurrentBlock();
// save active styles
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "saveActiveStyles");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("sty_save_active_styles"));
$this->tpl->parseCurrentBlock();
if ($with_subobjects === true)
{
}
$this->tpl->setCurrentBlock("tbl_action_row");
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjStyleSettingsGUI::toggleGlobalDefaultObject ( )

toggle global default style

public

Definition at line 806 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjectGUI\$ilias, and ilUtil\redirect().

{
global $ilias;
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if(count($_POST["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
$ilias->deleteSetting("fixed_content_style_id");
$def_style = $ilias->getSetting("default_content_style_id");
if ($def_style != $_POST["id"][0])
{
$ilias->setSetting("default_content_style_id", $_POST["id"][0]);
}
else
{
$ilias->deleteSetting("default_content_style_id");
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::toggleGlobalFixedObject ( )

toggle global fixed style

public

Definition at line 839 of file class.ilObjStyleSettingsGUI.php.

References $_POST, ilObjectGUI\$ilias, and ilUtil\redirect().

{
global $ilias;
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
if(count($_POST["id"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
}
$ilias->deleteSetting("default_content_style_id");
$fixed_style = $ilias->getSetting("fixed_content_style_id");
if ($fixed_style == $_POST["id"][0])
{
$ilias->deleteSetting("fixed_content_style_id");
}
else
{
$ilias->setSetting("fixed_content_style_id", $_POST["id"][0]);
}
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editContentStyles", "", false, false));
}

+ Here is the call graph for this function:

ilObjStyleSettingsGUI::viewPageLayoutsObject ( )

view list of page layouts

Definition at line 1009 of file class.ilObjStyleSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\$tpl.

Referenced by cancelCreateObject().

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$ilTabs->setTabActive('page_layouts');
$tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
$tpl->setCurrentBlock("btn_cell");
$tpl->setVariable("BTN_LINK",
$ilCtrl->getLinkTarget($this, "createPgGUI"));
$tpl->setVariable("BTN_TXT",$lng->txt("sty_add_pgl"));
$tpl->parseCurrentBlock();
$oa_tpl = new ilTemplate("tpl.stys_pglayout.html", true, true, "Services/Style");
include_once("./Services/Style/classes/class.ilPageLayoutTableGUI.php");
$pglayout_table = new ilPageLayoutTableGUI($this, "viewPageLayouts");
$oa_tpl->setVariable("PGLAYOUT_TABLE", $pglayout_table->getHTML());
$tpl->setContent($oa_tpl->get());
}

+ Here is the caller graph for this function:

Field Documentation

ilObjStyleSettingsGUI::$peditor_active = false

Constructor public.

Definition at line 29 of file class.ilObjStyleSettingsGUI.php.

ilObjStyleSettingsGUI::$pg_id = null

Definition at line 30 of file class.ilObjStyleSettingsGUI.php.


The documentation for this class was generated from the following file: