ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilHelpModuleTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 function __construct($a_parent_obj, $a_parent_cmd)
21 {
22 global $ilCtrl, $lng, $ilAccess, $lng;
23
24 $this->setId("help_mods");
25
26 parent::__construct($a_parent_obj, $a_parent_cmd);
27 $this->getHelpModules();
28 $this->setTitle($lng->txt("help_modules"));
29
30 $this->addColumn("", "", "1");
31 $this->addColumn($this->lng->txt("title"));
32 $this->addColumn($this->lng->txt("help_imported_on"));
33 $this->addColumn($this->lng->txt("actions"));
34
35 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
36 $this->setRowTemplate("tpl.help_module_row.html", "Services/Help");
37
38 $this->addMultiCommand("confirmHelpModulesDeletion", $lng->txt("delete"));
39 //$this->addCommandButton("", $lng->txt(""));
40 }
41
45 function getHelpModules()
46 {
47 $this->setData($this->parent_obj->object->getHelpModules());
48 }
49
53 protected function fillRow($a_set)
54 {
55 global $lng, $ilSetting, $ilCtrl;
56
57 $ilCtrl->setParameter($this->parent_obj, "hm_id", $a_set["id"]);
58 if ($a_set["id"] == $ilSetting->get("help_module"))
59 {
60 $this->tpl->setCurrentBlock("cmd");
61 $this->tpl->setVariable("HREF_CMD",
62 $ilCtrl->getLinkTarget($this->parent_obj, "deactivateModule"));
63 $this->tpl->setVariable("TXT_CMD", $lng->txt("deactivate"));
64 $this->tpl->parseCurrentBlock();
65 }
66 else
67 {
68 $this->tpl->setCurrentBlock("cmd");
69 $this->tpl->setVariable("HREF_CMD",
70 $ilCtrl->getLinkTarget($this->parent_obj, "activateModule"));
71 $this->tpl->setVariable("TXT_CMD", $lng->txt("activate"));
72 $this->tpl->parseCurrentBlock();
73 }
74 $ilCtrl->setParameter($this->parent_obj, "hm_id", "");
75 $this->tpl->setVariable("TITLE", $a_set["title"]);
76 $this->tpl->setVariable("CREATION_DATE",
78 $this->tpl->setVariable("ID", $a_set["id"]);
79
80 }
81
82}
83?>
const IL_CAL_DATETIME
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
TableGUI class for help modules.
fillRow($a_set)
Fill table row.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
Class ilTable2GUI.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilSetting
Definition: privfeed.php:40