4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
20 $lng->loadLanguageModule(
"content");
22 parent::__construct($a_parent_obj, $a_parent_cmd);
28 $this->
addColumn($lng->txt(
"description"));
35 if ($a_parent_obj->checkPermission(
"sty_write_page_layout",
false))
40 $this->
addCommandButton(
"savePageLayoutTypes", $lng->txt(
"cont_save_types"));
49 "Services/COPage/Layout");
50 $this->
setTitle($lng->txt(
"page_layouts"));
80 $ilCtrl->setParameter($this->parent_obj,
"layout_id", $a_set[
'layout_id']);
82 if ($this->parent_obj->checkPermission(
"sty_write_page_layout",
false))
84 $this->tpl->setCurrentBlock(
"action");
85 $this->tpl->setVariable(
"HREF_ACTION",
86 $ilCtrl->getLinkTarget($this->parent_obj,
"exportLayout"));
87 $this->tpl->setVariable(
"TXT_ACTION", $lng->txt(
"export"));
88 $this->tpl->parseCurrentBlock();
91 $ilCtrl->setParameter($this->parent_obj,
"layout_id",
"");
94 $this->tpl->setCurrentBlock(
"mod");
95 foreach($this->all_mods as $mod_id => $mod_caption)
100 $this->tpl->setVariable(
"MOD_STATUS",
" checked=\"checked\"");
102 $this->tpl->setVariable(
"MODULE_ID", $mod_id);
103 $this->tpl->setVariable(
"LAYOUT_ID", $a_set[
"layout_id"]);
104 $this->tpl->setVariable(
"MOD_NAME", $mod_caption);
105 $this->tpl->parseCurrentBlock();
108 if ($a_set[
'active'])
116 $this->tpl->setVariable(
"VAL_TITLE", $a_set[
'title']);
117 $this->tpl->setVariable(
"VAL_DESCRIPTION", $a_set[
'description']);
118 $this->tpl->setVariable(
"CHECKBOX_ID", $a_set[
'layout_id']);
120 $ilCtrl->setParameter($this->parent_obj,
"obj_id", $a_set[
'layout_id']);
121 if ($this->parent_obj->checkPermission(
"sty_write_page_layout",
false))
123 $this->tpl->setVariable(
"HREF_EDIT_PGLAYOUT", $ilCtrl->getLinkTarget($this->parent_obj,
"editPg"));
127 $this->tpl->setVariable(
"VAL_PREVIEW_HTML",$pgl_obj->getPreview());
129 if ($a_set[
"style_id"] > 0)
131 $this->tpl->setVariable(
"STYLE",
135 $this->tpl->setVariable(
"TYPE",
137 array(
"0" => $lng->txt(
"cont_layout_template"),
138 "1" => $lng->txt(
"cont_special_page")),
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
__construct($a_parent_obj, $a_parent_cmd)
static _lookupTitle($a_id)
lookup object title
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
TableGUI class for page layouts.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
getPageLayouts()
Get a List of all Page Layouts.
static getAvailableModules()
addMultiCommand($a_cmd, $a_text)
Add Command button.
fillRow($a_set)
Standard Version of Fill Row.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static getLayoutsAsArray($a_active=0)
Static access functions.
setEnableHeader($a_enableheader)
Set Enable Header.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all 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.