24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
39 function __construct($a_temp_type, $a_parent_obj, $a_parent_cmd, $a_style_obj)
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");
64 if ($rbacsystem->checkAccess(
"write", (
int)
$_GET[
"ref_id"]))
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 ($rbacsystem->checkAccess(
"write", (
int)
$_GET[
"ref_id"]))
101 $this->tpl->setVariable(
"LINK_EDIT_TEMPLATE",
102 $ilCtrl->getLinkTarget($this->parent_obj,
"editTemplate"));
103 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));