4 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
30 $lng->loadLanguageModule(
"wiki");
33 $this->
setTitle($lng->txt(
"wiki_functions"));
34 $this->allow_moving =
false;
72 $next_class = $ilCtrl->getNextClass();
73 $cmd = $ilCtrl->getCmd(
"getHTML");
89 $this->pageob = $a_pageob;
119 $tpl =
new ilTemplate(
"tpl.wiki_side_block_content.html",
true,
true,
"Modules/Wiki");
125 "txt" => $lng->txt(
"info_short"),
126 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"infoScreen")
131 "txt" => $lng->txt(
"wiki_recent_changes"),
132 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"recentChanges")
135 foreach ($actions as $a)
137 $tpl->setCurrentBlock(
"action");
138 $tpl->setVariable(
"HREF", $a[
"href"]);
139 $tpl->setVariable(
"TXT", $a[
"txt"]);
140 $tpl->parseCurrentBlock();
142 $tpl->touchBlock(
"item");
150 "txt" => $lng->txt(
"wiki_all_pages"),
151 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"allPages")
156 "txt" => $lng->txt(
"wiki_new_pages"),
157 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"newPages")
162 "txt" => $lng->txt(
"wiki_popular_pages"),
163 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"popularPages")
168 "txt" => $lng->txt(
"wiki_orphaned_pages"),
169 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"orphanedPages")
174 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
176 $list->setListTitle($lng->txt(
"wiki_page_lists"));
178 $list->setId(
"wiki_pglists");
180 foreach ($actions as $a)
182 $list->addItem($a[
"txt"],
"",
185 $tpl->setCurrentBlock(
"plain");
186 $tpl->setVariable(
"PLAIN", $list->getHTML());
187 $tpl->parseCurrentBlock();
188 $tpl->touchBlock(
"item");
194 $list->setListTitle($lng->txt(
"wiki_page_actions"));
195 $list->setId(
"wiki_pgactions");
197 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
204 $list->addItem($lng->txt(
"wiki_activate_page_rating"),
"",
205 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"activateWikiPageRating"));
209 $list->addItem($lng->txt(
"wiki_deactivate_page_rating"),
"",
210 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deactivateWikiPageRating"));
215 include_once(
"./Modules/Wiki/classes/class.ilWikiAdvMetaDataBlockGUI.php");
219 $list->addItem($lng->txt(
"wiki_unhide_meta_adv_records"),
"",
220 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unhideAdvancedMetaData"));
224 if (($ilAccess->checkAccess(
"edit_content",
"",
$_GET[
"ref_id"]) && !$this->
getPageObject()->getBlocked())
225 || $ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
228 $list->addItem($lng->txt(
"wiki_rename_page"),
"",
229 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"renameWikiPage"));
232 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
237 $list->addItem($lng->txt(
"wiki_unblock_page"),
"",
238 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unblockWikiPage"));
242 $list->addItem($lng->txt(
"wiki_block_page"),
"",
243 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"blockWikiPage"));
250 $list->addItem($lng->txt(
"wiki_delete_page"),
"",
251 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deleteWikiPageConfirmationScreen"));
254 include_once
"Modules/Wiki/classes/class.ilWikiPageTemplate.php";
256 if(!$wpt->isPageTemplate($this->getPageObject()->getId()))
258 $list->addItem($lng->txt(
"wiki_add_template"),
"",
259 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"addPageTemplateFromPageAction"));
263 $list->addItem($lng->txt(
"wiki_remove_template_status"),
"",
264 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"removePageTemplateFromPageAction"));
268 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) ||
269 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
271 $tpl->setCurrentBlock(
"plain");
272 $tpl->setVariable(
"PLAIN", $list->getHTML());
273 $tpl->parseCurrentBlock();
274 $tpl->touchBlock(
"item");
289 if ($ilAccess->checkAccess(
'write',
"",
$_GET[
"ref_id"]))
296 "txt" => $lng->txt(
"wiki_contributors"),
297 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"listContributors")
302 if ($ilAccess->checkAccess(
'write',
"",
$_GET[
"ref_id"]))
305 "txt" => $lng->txt(
"settings"),
306 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"editSettings")
309 else if ($ilAccess->checkAccess(
'statistics_read',
"",
$_GET[
"ref_id"]))
312 "txt" => $lng->txt(
"statistics"),
313 "href" => $ilCtrl->getLinkTargetByClass(array(
"ilobjwikigui",
"ilwikistatgui"),
"initial")
317 foreach ($actions as $a)
319 $tpl->setCurrentBlock(
"action");
320 $tpl->setVariable(
"HREF", $a[
"href"]);
321 $tpl->setVariable(
"TXT", $a[
"txt"]);
322 $tpl->parseCurrentBlock();
324 $tpl->touchBlock(
"item");