4 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
5 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
30 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
32 $tpl->setCurrentBlock(
"SyntaxStyle");
33 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
35 $tpl->parseCurrentBlock();
58 $next_class = $this->ctrl->getNextClass($this);
59 $cmd = $this->ctrl->getCmd();
65 $ilTabs->setTabActive(
"pg");
70 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
72 $rating_gui->setObject($this->
getPageObject()->getParentId(),
"wiki",
74 $this->ctrl->forwardCommand($rating_gui);
75 $ilCtrl->redirect($this,
"preview");
78 case "ilpageobjectgui":
81 $page_gui->setPresentationTitle($this->
getWikiPage()->getTitle());
82 return $ilCtrl->forwardCommand($page_gui);
117 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
129 include_once(
"./Modules/Wiki/classes/class.ilWikiSideBlockGUI.php");
131 $wiki_side_block->setPageObject($this->
getWikiPage());
134 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php");
136 $rcontent = $wiki_side_block->getHTML().$wiki_search_block->getHTML();
138 $tpl->setRightContent($rcontent);
150 $wtpl =
new ilTemplate(
"tpl.wiki_page_view_main_column.html",
151 true,
true,
"Modules/Wiki");
155 $page_commands =
false;
156 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
161 $wtpl->setCurrentBlock(
"page_command");
162 $wtpl->setVariable(
"HREF_PAGE_CMD",
163 $ilCtrl->getLinkTarget($this,
"deleteWikiPageConfirmationScreen"));
164 $wtpl->setVariable(
"TXT_PAGE_CMD", $lng->txt(
"delete"));
165 $wtpl->parseCurrentBlock();
170 $wtpl->setCurrentBlock(
"page_commands");
171 $wtpl->parseCurrentBlock();
178 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
180 $rating_gui->setObject($this->
getPageObject()->getParentId(),
"wiki",
182 $wtpl->setVariable(
"RATING", $ilCtrl->getHtml($rating_gui));
186 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
190 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
192 $notes_gui->enablePublicNotesDeletion(
true);
194 $notes_gui->enablePrivateNotes();
197 $notes_gui->enablePublicNotes();
200 $next_class = $this->ctrl->getNextClass($this);
201 if ($next_class ==
"ilnotegui")
203 $html = $this->ctrl->forwardCommand($notes_gui);
207 $html = $notes_gui->getNotesHTML();
209 $wtpl->setVariable(
"NOTES", $html);
212 $append = (
$_GET[
"page"] !=
"")
215 include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
217 $wtpl->setVariable(
"PERMA_LINK", $perma_link->getHTML());
219 $wtpl->setVariable(
"PAGE", parent::preview());
248 include_once(
"./Modules/Wiki/classes/class.ilWikiUtil.php");
261 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
267 $tpl->setContent($table_gui->getHTML());
276 $ilCtrl->setParameterByClass(
"ilobjwikigui",
"wpg_id",
281 $ilTabs->addTarget(
"wiki_what_links_here",
282 $this->ctrl->getLinkTargetByClass(
"ilwikipagegui",
283 "whatLinksHere"),
"whatLinksHere");
284 $ilTabs->addTarget(
"wiki_print_view",
285 $this->ctrl->getLinkTargetByClass(
"ilobjwikigui",
286 "printView"),
"printView",
"",
"_blank");
297 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
299 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
301 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
302 $confirmation_gui->setHeaderText($lng->txt(
"wiki_page_deletion_confirmation"));
303 $confirmation_gui->setCancel($lng->txt(
"cancel"),
"cancelWikiPageDeletion");
304 $confirmation_gui->setConfirm($lng->txt(
"delete"),
"confirmWikiPageDeletion");
306 $dtpl =
new ilTemplate(
"tpl.wiki_page_deletion_confirmation.html",
true,
307 true,
"Modules/Wiki");
309 $dtpl->setVariable(
"PAGE_TITLE", $this->
getWikiPage()->getTitle());
312 $dtpl->setVariable(
"TXT_OTHER_PAGES", $lng->txt(
"wiki_other_pages_linking"));
315 if (count($pages) > 0)
317 foreach($pages as $page)
319 $dtpl->setCurrentBlock(
"lpage");
320 $dtpl->setVariable(
"TXT_LINKING_PAGE", $page[
"title"]);
321 $dtpl->parseCurrentBlock();
326 $dtpl->setCurrentBlock(
"lpage");
327 $dtpl->setVariable(
"TXT_LINKING_PAGE",
"-");
328 $dtpl->parseCurrentBlock();
332 $dtpl->setVariable(
"TXT_CONTRIBUTORS", $lng->txt(
"wiki_contributors"));
334 foreach($contributors as $contributor)
336 $dtpl->setCurrentBlock(
"contributor");
337 $dtpl->setVariable(
"TXT_CONTRIBUTOR",
338 $contributor[
"lastname"].
", ".$contributor[
"firstname"]);
339 $dtpl->parseCurrentBlock();
343 include_once(
"./Services/Notes/classes/class.ilNote.php");
346 $dtpl->setVariable(
"TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
347 $lng->txt(
"wiki_number_users_notes_or_comments"));
348 $dtpl->setVariable(
"TXT_NR_NOTES_COMMENTS", $cnt_note_users);
350 $confirmation_gui->addItem(
"",
"", $dtpl->get());
352 $tpl->setContent($confirmation_gui->getHTML());
363 $ilCtrl->redirect($this,
"preview");
374 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
381 $ilCtrl->redirectByClass(
"ilobjwikigui",
"allPages");