3 require_once
'Services/Table/classes/class.ilTable2GUI.php';
4 require_once
'Services/Calendar/classes/class.ilDatePresentation.php';
33 public function __construct($a_parent_obj, $a_parent_cmd, $a_template_context)
37 $this->lng = $DIC->language();
38 $this->ctrl = $DIC->ctrl();
39 $this->parent_cmd = $a_parent_cmd;
41 $this->
setId(
'frm_drafts_' . substr(md5($this->parent_cmd), 0, 3) .
'_' . $a_parent_obj->object->getId());
43 parent::__construct($a_parent_obj, $a_parent_cmd, $a_template_context);
45 $this->
setFormAction($this->ctrl->getFormAction($this->getParentObject(),
'showThreads'));
46 $this->
setRowTemplate(
'tpl.forums_threads_drafts_table.html',
'Modules/Forum');
51 $this->
addColumn(
'',
'check',
'1px',
true);
52 $this->
addColumn($this->lng->txt(
'drafts'),
'');
53 $this->
addColumn($this->lng->txt(
'edited_on'),
'');
55 $this->
addMultiCommand(
'confirmDeleteThreadDrafts', $this->lng->txt(
'delete'));
62 (isset(
$_POST[
'draft_ids']) && in_array($draft[
'draft_id'],
$_POST[
'draft_ids']) ?
true :
false),
67 $subject =
'<div><a href="' . $this->ctrl->getLinkTarget($this->
getParentObject(),
'editThreadDraft&draft_id=' . $draft[
'draft_id']) .
'">' . $draft[
'subject'] .
'</a></div>';
69 $this->tpl->setVariable(
'VAL_SUBJECT', $subject);
70 $this->tpl->setVariable(
'VAL_DATE', $date);
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
Class ilForumDraftsTableGUI.
getParentObject()
Get parent object.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
__construct($a_parent_obj, $a_parent_cmd, $a_template_context)
ilForumDraftsTableGUI constructor.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public