ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilWikiSideBlockGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("Services/Block/classes/class.ilBlockGUI.php");
5 
17 {
18  static $block_type = "wikiside";
19  static $st_data;
20 
24  function __construct()
25  {
26  global $ilCtrl, $lng;
27 
29 
30  //$this->setImage(ilUtil::getImagePath("icon_news_s.png"));
31 
32  $lng->loadLanguageModule("wiki");
33  //$this->setBlockId(...);
34  /*$this->setLimit(5);
35  $this->setAvailableDetailLevels(3);*/
36  $this->setEnableNumInfo(false);
37 
38  $this->setTitle($lng->txt("wiki_quick_navigation"));
39  //$this->setRowTemplate("tpl.block_row_news_for_context.html", "Services/News");
40  //$this->setData($data);
41  $this->allow_moving = false;
42  //$this->handleView();
43  }
44 
50  static function getBlockType()
51  {
52  return self::$block_type;
53  }
54 
60  static function isRepositoryObject()
61  {
62  return false;
63  }
64 
68  static function getScreenMode()
69  {
70  return IL_SCREEN_SIDE;
71  }
72 
76  function &executeCommand()
77  {
78  global $ilCtrl;
79 
80  $next_class = $ilCtrl->getNextClass();
81  $cmd = $ilCtrl->getCmd("getHTML");
82 
83  switch ($next_class)
84  {
85  default:
86  return $this->$cmd();
87  }
88  }
89 
95  function setPageObject($a_pageob)
96  {
97  $this->pageob = $a_pageob;
98  }
99 
105  function getPageObject()
106  {
107  return $this->pageob;
108  }
109 
113  function getHTML()
114  {
115  global $ilCtrl, $lng, $ilUser;
116 
117  return parent::getHTML();
118  }
119 
123  function fillDataSection()
124  {
125  global $ilCtrl, $lng, $ilAccess;
126 
127  $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
128 
129  $wp = $this->getPageObject();
130 
131  // start page
132  $actions[] = array(
133  "txt" => $lng->txt("wiki_start_page"),
134  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "gotoStartPage")
135  );
136 
137  // all pages
138  $actions[] = array(
139  "txt" => $lng->txt("wiki_all_pages"),
140  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages")
141  );
142 
143  // new pages
144  $actions[] = array(
145  "txt" => $lng->txt("wiki_new_pages"),
146  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages")
147  );
148 
149  // popular pages
150  $actions[] = array(
151  "txt" => $lng->txt("wiki_popular_pages"),
152  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages")
153  );
154 
155  // orphaned pages
156  $actions[] = array(
157  "txt" => $lng->txt("wiki_orphaned_pages"),
158  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages")
159  );
160 
161  // recent changes
162  $actions[] = array(
163  "txt" => $lng->txt("wiki_recent_changes"),
164  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges")
165  );
166 
167  foreach ($actions as $a)
168  {
169  $tpl->setCurrentBlock("action");
170  $tpl->setVariable("HREF", $a["href"]);
171  $tpl->setVariable("TXT", $a["txt"]);
172  $tpl->parseCurrentBlock();
173 
174  $tpl->touchBlock("item");
175  }
176 
177  $this->setDataSection($tpl->get());
178  }
179 }
180 
181 ?>