ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilImportantPagesTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 
15 {
16 
20  function __construct($a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  parent::__construct($a_parent_obj, $a_parent_cmd);
25  $data = array("page_id" => 0) +
26  ilObjWiki::_lookupImportantPagesList($a_parent_obj->object->getId());
27  $this->setData($data);
28  $this->setTitle($lng->txt(""));
29  $this->setLimit(9999);
30 
31  $this->addColumn("", "", "1", true);
32  $this->addColumn($this->lng->txt("wiki_ordering"), "order");
33  $this->addColumn($this->lng->txt("wiki_indentation"));
34  $this->addColumn($this->lng->txt("wiki_page"));
35 
36  $this->setEnableHeader(true);
37  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
38  $this->setRowTemplate("tpl.imp_pages_row.html", "Modules/Wiki");
39  //$this->disable("footer");
40  $this->setEnableTitle(true);
41 
42  $this->addMultiCommand("confirmRemoveImportantPages", $lng->txt("remove"));
43  $this->addCommandButton("saveOrderingAndIndent", $lng->txt("wiki_save_ordering_and_indent"));
44  }
45 
49  protected function fillRow($a_set)
50  {
51  global $lng;
52 
53  if ($a_set["page_id"] > 0)
54  {
55  $this->tpl->setCurrentBlock("cb");
56  $this->tpl->setVariable("PAGE_ID", $a_set["page_id"]);
57  $this->tpl->parseCurrentBlock();
58 
59  $this->tpl->setCurrentBlock("ord");
60  $this->tpl->setVariable("PAGE_ID_ORD", $a_set["page_id"]);
61  $this->tpl->setVariable("VAL_ORD", $a_set["ord"]);
62  $this->tpl->parseCurrentBlock();
63 
64  $this->tpl->setVariable("PAGE_TITLE",
65  ilWikiPage::lookupTitle($a_set["page_id"]));
66  $this->tpl->setVariable("SEL_INDENT",
67  ilUtil::formSelect($a_set["indent"], "indent[".$a_set["page_id"]."]",
68  array(0 => "0", 1 => "1", 2 => "2"), false, true));
69  }
70  else
71  {
72  $this->tpl->setVariable("PAGE_TITLE",
73  $lng->txt("wiki_start_page"));
74  }
75  }
76 
77 }
78 ?>