24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
39 function __construct($a_temp_type, $a_parent_obj, $a_parent_cmd, $a_style_obj)
43 parent::__construct($a_parent_obj, $a_parent_cmd);
46 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
49 $this->
setTitle($lng->txt(
"sty_templates"));
50 $this->style_obj = $a_style_obj;
51 $this->temp_type = $a_temp_type;
54 $this->
addColumn($this->lng->txt(
"sty_template_name"),
"");
55 $this->
addColumn($this->lng->txt(
"sty_preview"),
"");
56 $this->
addColumn($this->lng->txt(
"sty_commands"),
"",
"1");
59 $this->
setRowTemplate(
"tpl.style_template_row.html",
"Services/Style/Content");
64 if ($this->parent_obj->checkWrite())
66 $this->
addMultiCommand(
"deleteTemplateConfirmation", $lng->txt(
"delete"));
68 if ($a_temp_type ==
"table")
70 $this->
addCommandButton(
"generateTemplate", $this->lng->txt(
"sty_generate_template"));
83 $this->
setData($this->style_obj->getTemplates($this->temp_type));
93 $this->tpl->setVariable(
"T_PREVIEW",
94 $this->style_obj->lookupTemplatePreview($a_set[
"id"]));
95 $this->tpl->setVariable(
"TID", $a_set[
"id"]);
96 $this->tpl->setVariable(
"TEMPLATE_NAME", $a_set[
"name"]);
97 $ilCtrl->setParameter($this->parent_obj,
"t_id", $a_set[
"id"]);
99 if ($this->parent_obj->checkWrite())
101 $this->tpl->setVariable(
"LINK_EDIT_TEMPLATE",
102 $ilCtrl->getLinkTarget($this->parent_obj,
"editTemplate"));
103 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
getItems()
Get items of current folder.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
__construct($a_temp_type, $a_parent_obj, $a_parent_cmd, $a_style_obj)
Constructor.
static addCss()
Add required css.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
fillRow($a_set)
Fill table row.
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.