24 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
25 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
50 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
51 $tpl->setCurrentBlock(
"ContentStyle");
52 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
54 $tpl->parseCurrentBlock();
56 $tpl->setCurrentBlock(
"SyntaxStyle");
57 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
59 $tpl->parseCurrentBlock();
81 $next_class = $this->ctrl->getNextClass($this);
82 $cmd = $this->ctrl->getCmd();
88 $ilTabs->setTabActive(
"pg");
93 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
95 $rating_gui->setObject($this->
getPageObject()->getParentId(),
"wiki",
97 $this->ctrl->forwardCommand($rating_gui);
98 $ilCtrl->redirect($this,
"preview");
101 case "ilpageobjectgui":
104 return $ilCtrl->forwardCommand($page_gui);
138 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
150 include_once(
"./Modules/Wiki/classes/class.ilWikiSideBlockGUI.php");
152 $wiki_side_block->setPageObject($this->
getWikiPage());
155 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php");
157 $rcontent = $wiki_side_block->getHTML().$wiki_search_block->getHTML();
159 $tpl->setRightContent($rcontent);
171 $wtpl =
new ilTemplate(
"tpl.wiki_page_view_main_column.html",
172 true,
true,
"Modules/Wiki");
176 $page_commands =
false;
177 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
182 $wtpl->setCurrentBlock(
"page_command");
183 $wtpl->setVariable(
"HREF_PAGE_CMD",
184 $ilCtrl->getLinkTarget($this,
"deleteWikiPageConfirmationScreen"));
185 $wtpl->setVariable(
"TXT_PAGE_CMD", $lng->txt(
"delete"));
186 $wtpl->parseCurrentBlock();
191 $wtpl->setCurrentBlock(
"page_commands");
192 $wtpl->parseCurrentBlock();
199 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
201 $rating_gui->setObject($this->
getPageObject()->getParentId(),
"wiki",
203 $wtpl->setVariable(
"RATING", $ilCtrl->getHtml($rating_gui));
207 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
211 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
213 $notes_gui->enablePublicNotesDeletion(
true);
215 $notes_gui->enablePrivateNotes();
218 $notes_gui->enablePublicNotes();
221 $next_class = $this->ctrl->getNextClass($this);
222 if ($next_class ==
"ilnotegui")
224 $html = $this->ctrl->forwardCommand($notes_gui);
228 $html = $notes_gui->getNotesHTML();
230 $wtpl->setVariable(
"NOTES", $html);
233 $append = (
$_GET[
"page"] !=
"")
236 include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
238 $wtpl->setVariable(
"PERMA_LINK", $perma_link->getHTML());
240 $wtpl->setVariable(
"PAGE", parent::preview());
269 include_once(
"./Modules/Wiki/classes/class.ilWikiUtil.php");
282 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
288 $tpl->setContent($table_gui->getHTML());
297 $ilCtrl->setParameterByClass(
"ilobjwikigui",
"wpg_id",
302 $ilTabs->addTarget(
"wiki_what_links_here",
303 $this->ctrl->getLinkTargetByClass(
"ilwikipagegui",
304 "whatLinksHere"),
"whatLinksHere");
305 $ilTabs->addTarget(
"wiki_print_view",
306 $this->ctrl->getLinkTargetByClass(
"ilobjwikigui",
307 "printView"),
"printView");
318 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
320 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
322 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
323 $confirmation_gui->setHeaderText($lng->txt(
"wiki_page_deletion_confirmation"));
324 $confirmation_gui->setCancel($lng->txt(
"cancel"),
"cancelWikiPageDeletion");
325 $confirmation_gui->setConfirm($lng->txt(
"delete"),
"confirmWikiPageDeletion");
327 $dtpl =
new ilTemplate(
"tpl.wiki_page_deletion_confirmation.html",
true,
328 true,
"Modules/Wiki");
330 $dtpl->setVariable(
"PAGE_TITLE", $this->
getWikiPage()->getTitle());
333 $dtpl->setVariable(
"TXT_OTHER_PAGES", $lng->txt(
"wiki_other_pages_linking"));
336 if (count($pages) > 0)
338 foreach($pages as $page)
340 $dtpl->setCurrentBlock(
"lpage");
341 $dtpl->setVariable(
"TXT_LINKING_PAGE", $page[
"title"]);
342 $dtpl->parseCurrentBlock();
347 $dtpl->setCurrentBlock(
"lpage");
348 $dtpl->setVariable(
"TXT_LINKING_PAGE",
"-");
349 $dtpl->parseCurrentBlock();
353 $dtpl->setVariable(
"TXT_CONTRIBUTORS", $lng->txt(
"wiki_contributors"));
355 foreach($contributors as $contributor)
357 $dtpl->setCurrentBlock(
"contributor");
358 $dtpl->setVariable(
"TXT_CONTRIBUTOR",
359 $contributor[
"lastname"].
", ".$contributor[
"firstname"]);
360 $dtpl->parseCurrentBlock();
364 include_once(
"./Services/Notes/classes/class.ilNote.php");
367 $dtpl->setVariable(
"TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
368 $lng->txt(
"wiki_number_users_notes_or_comments"));
369 $dtpl->setVariable(
"TXT_NR_NOTES_COMMENTS", $cnt_note_users);
371 $confirmation_gui->addItem(
"",
"", $dtpl->get());
373 $tpl->setContent($confirmation_gui->getHTML());
385 $ilCtrl->redirect($this,
"preview");
396 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
403 $ilCtrl->redirectByClass(
"ilobjwikigui",
"allPages");