ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
5 include_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",
77  ilDatePresentation::formatDate(new ilDateTime($a_set["create_date"],IL_CAL_DATETIME)));
78  $this->tpl->setVariable("ID", $a_set["id"]);
79 
80  }
81 
82 }
83 ?>