4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
5 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
6 require_once
'Services/Mail/classes/class.ilMailTemplateService.php';
28 public function __construct($a_parent_obj, $a_parent_cmd)
37 $this->
setId(
'mail_man_tpl');
38 parent::__construct($a_parent_obj, $a_parent_cmd);
44 $this->
addColumn($this->lng->txt(
'title'),
'title',
'30%');
45 $this->
addColumn($this->lng->txt(
'mail_template_context'),
'context',
'20%');
47 $this->
addColumn($this->lng->txt(
'action'),
'',
'10%');
49 $this->
setRowTemplate(
'tpl.mail_template_row.html',
'Services/Mail');
50 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
53 $this->
addMultiCommand(
'confirmDeleteTemplate', $this->lng->txt(
'delete'));
65 if($column ==
'tpl_id')
69 else if($column ==
'lang')
71 return $this->lng->txt(
'meta_l_' . $row[$column]);
73 else if($column ==
'context')
75 if(isset($this->contexts[$row[$column]]))
77 return $this->contexts[$row[$column]]->getTitle();
81 return $this->lng->txt(
'mail_template_orphaned_context');
93 foreach($row as $column => $value)
96 $this->tpl->setVariable(
'VAL_' . strtoupper($column), $value);
99 $this->ctrl->setParameter($this->
getParentObject(),
'tpl_id', $row[
'tpl_id']);
101 $actions->setListTitle($this->lng->txt(
'actions'));
102 $actions->setId(
'act_' . $row[
'tpl_id']);
103 if(count($this->contexts))
105 $actions->addItem($this->lng->txt(
'edit'),
'', $this->ctrl->getLinkTarget($this->parent_obj,
'showEditTemplateForm'));
107 $actions->addItem($this->lng->txt(
'delete'),
'', $this->ctrl->getLinkTarget($this->parent_obj,
'confirmDeleteTemplate'));
108 $this->tpl->setVariable(
'VAL_ACTION', $actions->getHTML());
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
Constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
formatCellValue($column, array $row)
getParentObject()
Get parent object.
static getTemplateContexts($a_id=null)
Returns an array of mail template contexts, the key of each entry matches its id. ...
Class ilMailTemplateTableGUI.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public