ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ?>
fillRow($a_set)
Fill table row.
getHelpModules()
Get help modules.
const IL_CAL_DATETIME
TableGUI class for help modules.
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
addMultiCommand($a_cmd, $a_text)
Add Command button.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilSetting
Definition: privfeed.php:17
global $lng
Definition: privfeed.php:17
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.