4 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
5 require_once
"./Modules/Wiki/classes/class.ilObjWiki.php";
26 function ilObjWikiGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
32 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
33 $lng->loadLanguageModule(
"wiki");
35 if (
$_GET[
"page"] !=
"")
45 $next_class = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
52 case "ilinfoscreengui":
58 case 'ilpermissiongui':
60 $ilTabs->activateTab(
"perm_settings");
61 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
63 $ret =& $this->ctrl->forwardCommand($perm_gui);
68 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
71 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
73 $this->object->getStyleSheetId(),
"wiki"));
75 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
76 (!$ilAccess->checkAccess(
"edit_content",
"", $this->object->getRefId()) ||
77 $wpage_gui->getPageObject()->getBlocked()
80 $wpage_gui->setEnableEditing(
false);
87 $ret = $this->ctrl->forwardCommand($wpage_gui);
90 $tpl->setContent(
$ret);
94 case 'ilpublicuserprofilegui':
95 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
97 $ret = $this->ctrl->forwardCommand($profile_gui);
98 $tpl->setContent(
$ret);
101 case "ilobjstylesheetgui":
102 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
103 $this->ctrl->setReturn($this,
"editStyleProperties");
104 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
106 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
108 $style_gui->setCreationMode(
true);
111 if (
$cmd ==
"confirmedDelete")
113 $this->
object->setStyleSheetId(0);
114 $this->
object->update();
117 $ret = $this->ctrl->forwardCommand($style_gui);
119 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
122 $this->
object->setStyleSheetId($style_id);
123 $this->
object->update();
124 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
131 $ilTabs->activateTab(
"export");
132 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
134 $exp_gui->addFormat(
"xml");
135 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
136 $ret = $this->ctrl->forwardCommand($exp_gui);
140 case "ilcommonactiondispatchergui":
141 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
143 $this->ctrl->forwardCommand($gui);
149 $ilTabs->activateTab(
"settings");
151 include_once(
"Services/Rating/classes/class.ilRatingGUI.php");
153 $gui->setObject($this->object->getId(), $this->
object->getType());
154 $gui->setExportCallback(array($this,
"getSubObjectTitle"), $this->lng->txt(
"page"));
155 $this->ctrl->forwardCommand($gui);
165 if (
$cmd !=
"infoScreenObject")
187 if (is_object($this->
object))
208 $forms = array(self::CFORM_NEW => $this->form_gui,
224 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
228 if ($this->form_gui->checkInput())
232 $short_item = $this->form_gui->getItemByPostVar(
"shorttitle");
233 $short_item->setAlert($lng->txt(
"wiki_short_title_already_in_use"));
238 $_POST[
"title"] = $this->form_gui->getInput(
"title");
239 $_POST[
"desc"] = $this->form_gui->getInput(
"description");
244 $this->form_gui->setValuesByPost();
245 $tpl->setContent($this->form_gui->getHtml());
256 $newObj->setTitle($this->form_gui->getInput(
"title"));
257 $newObj->setDescription($this->form_gui->getInput(
"description"));
258 $newObj->setIntroduction($this->form_gui->getInput(
"intro"));
259 $newObj->setStartPage($this->form_gui->getInput(
"startpage"));
260 $newObj->setShortTitle($this->form_gui->getInput(
"shorttitle"));
261 $newObj->setRating($this->form_gui->getInput(
"rating"));
262 $newObj->setRatingAsBlock($this->form_gui->getInput(
"rating_side"));
263 $newObj->setRatingForNewPages($this->form_gui->getInput(
"rating_new"));
264 $newObj->setRatingCategories($this->form_gui->getInput(
"rating_ext"));
265 if (!$ilSetting->get(
"disable_comments"))
267 $newObj->setPublicNotes($this->form_gui->getInput(
"public_notes"));
269 $newObj->setOnline($this->form_gui->getInput(
"online"));
285 $this->ctrl->setCmd(
"showSummary");
286 $this->ctrl->setCmdClass(
"ilinfoscreengui");
297 $ilTabs->activateTab(
"info_short");
299 if (!$ilAccess->checkAccess(
"visible",
"", $this->object->getRefId()))
301 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
304 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
306 $info->enablePrivateNotes();
307 if (trim($this->object->getIntroduction()) !=
"")
309 $info->addSection($lng->txt(
"wiki_introduction"));
310 $info->addProperty(
"", nl2br($this->object->getIntroduction()));
314 include_once(
"./Modules/Wiki/classes/class.ilWikiContributor.php");
315 include_once(
"./Services/Tracking/classes/class.ilLPMarks.php");
321 $info->addSection($this->lng->txt(
"wiki_feedback_from_tutor"));
322 if ($lpcomment !=
"")
324 $info->addProperty($this->lng->txt(
"wiki_comment"),
329 $info->addProperty($this->lng->txt(
"wiki_mark"),
335 $info->addProperty($this->lng->txt(
"status"),
336 $this->lng->txt(
"wiki_passed"));
340 $info->addProperty($this->lng->txt(
"status"),
341 $this->lng->txt(
"wiki_failed"));
353 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
359 $this->lng->loadLanguageModule(
"meta");
360 $this->lng->loadLanguageModule(
"wiki");
367 $this->ctrl->forwardCommand($info);
369 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
392 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
393 $ilCtrl->setParameter($this,
"wpg_id",
396 $ilTabs->addTarget(
"wiki_what_links_here",
397 $this->ctrl->getLinkTargetByClass(
"ilwikipagegui",
398 "whatLinksHere"),
"whatLinksHere");
402 $ilTabs->addTarget(
"wiki_print_view",
403 $this->ctrl->getLinkTargetByClass(
"ilwikipagegui",
404 "printViewSelection"),
"printViewSelection");
414 $ilTabs->activateTab(
"wiki_pages");
416 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
417 $ilCtrl->setParameter($this,
"wpg_id",
421 $ilTabs->addSubTabTarget(
"wiki_all_pages",
422 $this->ctrl->getLinkTarget($this,
"allPages"),
"allPages");
423 $ilTabs->addSubTabTarget(
"wiki_recent_changes",
424 $this->ctrl->getLinkTarget($this,
"recentChanges"),
"recentChanges");
425 $ilTabs->addSubTabTarget(
"wiki_new_pages",
426 $this->ctrl->getLinkTarget($this,
"newPages"),
"newPages");
427 $ilTabs->addSubTabTarget(
"wiki_popular_pages",
428 $this->ctrl->getLinkTarget($this,
"popularPages"),
"popularPages");
429 $ilTabs->addSubTabTarget(
"wiki_orphaned_pages",
430 $this->ctrl->getLinkTarget($this,
"orphanedPages"),
"orphanedPages");
442 $ilHelp->setScreenIdComponent(
"wiki");
445 if (in_array($ilCtrl->getCmdClass(), array(
"",
"ilobjwikigui",
446 "ilinfoscreengui",
"ilpermissiongui",
"ilexportgui",
"ilratingcategorygui")))
448 if (
$_GET[
"page"] !=
"")
450 $tabs_gui->setBackTarget($lng->txt(
"wiki_last_visited_page"),
456 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()))
458 $ilTabs->addTab(
"wiki_pages",
459 $lng->txt(
"wiki_pages"),
460 $this->ctrl->getLinkTarget($this,
"allPages"));
464 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
466 $ilTabs->addTab(
"info_short",
467 $lng->txt(
"info_short"),
468 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
472 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId()))
474 $ilTabs->addTab(
"settings",
475 $lng->txt(
"settings"),
476 $this->ctrl->getLinkTarget($this,
"editSettings"));
480 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId()))
482 $ilTabs->addTab(
"wiki_contributors",
483 $lng->txt(
"wiki_contributors"),
484 $this->ctrl->getLinkTarget($this,
"listContributors"));
487 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
489 $ilTabs->addTab(
"export",
491 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
496 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
498 $ilTabs->addTab(
"perm_settings",
499 $lng->txt(
"perm_settings"),
500 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
512 if (in_array($a_active,
513 array(
"general_settings",
"style",
"imp_pages",
"rating_categories")))
516 $ilTabs->addSubTab(
"general_settings",
517 $lng->txt(
"wiki_general_settings"),
518 $ilCtrl->getLinkTarget($this,
'editSettings'));
521 $ilTabs->addSubTab(
"style",
522 $lng->txt(
"wiki_style"),
523 $ilCtrl->getLinkTarget($this,
'editStyleProperties'));
526 $ilTabs->addSubTab(
"imp_pages",
527 $lng->txt(
"wiki_navigation"),
528 $ilCtrl->getLinkTarget($this,
'editImportantPages'));
531 if($this->object->getRating() && $this->
object->getRatingCategories())
533 $lng->loadLanguageModule(
"rating");
534 $ilTabs->addSubTab(
"rating_categories",
535 $lng->txt(
"rating_categories"),
536 $ilCtrl->getLinkTargetByClass(array(
'ilratinggui',
'ilratingcategorygui'),
''));
539 $ilTabs->activateSubTab($a_active);
558 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
560 $ecs->addSettingsToForm($this->form_gui,
'wiki');
562 $tpl->setContent($this->form_gui->getHtml());
573 $lng->loadLanguageModule(
"wiki");
574 $ilTabs->activateTab(
"settings");
576 include(
"Services/Form/classes/class.ilPropertyFormGUI.php");
582 $this->form_gui->addItem($tit);
600 $this->form_gui->addItem($des);
606 $this->form_gui->addItem($intro);
609 $sp =
new ilTextInputGUI($lng->txt(
"wiki_start_page"),
"startpage");
610 if ($a_mode ==
"edit")
612 $sp->
setInfo($lng->txt(
"wiki_start_page_info"));
614 $sp->setMaxLength(200);
615 $sp->setRequired(
true);
616 $this->form_gui->addItem($sp);
620 $this->form_gui->addItem($online);
625 $this->form_gui->addItem($rating);
627 $side =
new ilCheckboxInputGUI($lng->txt(
"wiki_activate_sideblock_rating"),
"rating_side");
630 $new =
new ilCheckboxInputGUI($lng->txt(
"wiki_activate_new_page_rating"),
"rating_new");
633 $extended =
new ilCheckboxInputGUI($lng->txt(
"wiki_activate_extended_rating"),
"rating_ext");
638 if (!$ilSetting->get(
"disable_comments"))
640 $comments =
new ilCheckboxInputGUI($lng->txt(
"wiki_public_comments"),
"public_notes");
641 $this->form_gui->addItem($comments);
650 $page_toc->
setInfo($lng->txt(
"wiki_page_toc_info"));
651 $this->form_gui->addItem($page_toc);
655 if ($a_mode !=
"create")
657 $this->form_gui->setTitle($lng->txt(
"wiki_settings"));
658 $this->form_gui->addCommandButton(
"saveSettings", $lng->txt(
"save"));
662 $this->form_gui->setTitle($lng->txt(
"wiki_new"));
663 $this->form_gui->addCommandButton(
"save", $lng->txt(
"wiki_add"));
664 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
668 if ($a_mode ==
"create")
670 $ilCtrl->setParameter($this,
"new_type",
"wiki");
673 $this->form_gui->setFormAction($ilCtrl->getFormAction($this,
"saveSettings"));
681 if ($a_mode ==
"create")
683 $values[
"startpage"] = $lng->txt(
"wiki_main_page");
684 $values[
"rating_new"] =
true;
685 $this->form_gui->setValuesByArray($values);
689 $values[
"online"] = $this->
object->getOnline();
690 $values[
"title"] = $this->
object->getTitle();
691 $values[
"startpage"] = $this->
object->getStartPage();
692 $values[
"shorttitle"] = $this->
object->getShortTitle();
693 $values[
"description"] = $this->
object->getLongDescription();
694 $values[
"rating"] = $this->
object->getRating();
695 $values[
"rating_side"] = $this->
object->getRatingAsBlock();
696 $values[
"rating_new"] = $this->
object->getRatingForNewPages();
697 $values[
"rating_ext"] = $this->
object->getRatingCategories();
698 $values[
"public_notes"] = $this->
object->getPublicNotes();
699 $values[
"intro"] = $this->
object->getIntroduction();
701 $values[
"page_toc"] = $this->
object->getPageToc();
703 $this->form_gui->setValuesByArray($values);
719 if ($this->form_gui->checkInput())
722 $this->form_gui->getInput(
"shorttitle") != $this->
object->getShortTitle())
724 $short_item = $this->form_gui->getItemByPostVar(
"shorttitle");
725 $short_item->setAlert($lng->txt(
"wiki_short_title_already_in_use"));
729 $this->
object->setTitle($this->form_gui->getInput(
"title"));
730 $this->
object->setDescription($this->form_gui->getInput(
"description"));
731 $this->
object->setOnline($this->form_gui->getInput(
"online"));
732 $this->
object->setStartPage($this->form_gui->getInput(
"startpage"));
733 $this->
object->setShortTitle($this->form_gui->getInput(
"shorttitle"));
734 $this->
object->setRating($this->form_gui->getInput(
"rating"));
735 $this->
object->setRatingAsBlock($this->form_gui->getInput(
"rating_side"));
736 $this->
object->setRatingForNewPages($this->form_gui->getInput(
"rating_new"));
737 $this->
object->setRatingCategories($this->form_gui->getInput(
"rating_ext"));
739 if (!$ilSetting->get(
"disable_comments"))
741 $this->
object->setPublicNotes($this->form_gui->getInput(
"public_notes"));
743 $this->
object->setIntroduction($this->form_gui->getInput(
"intro"));
745 $this->
object->setPageToc($this->form_gui->getInput(
"page_toc"));
746 $this->
object->update();
749 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
751 if($ecs->handleSettingsUpdate())
754 $ilCtrl->redirect($this,
"editSettings");
759 $this->form_gui->setValuesByPost();
760 $this->tpl->setContent($this->form_gui->getHTML());
768 global
$tpl, $ilTabs;
771 $ilTabs->activateTab(
"wiki_contributors");
773 include_once(
"./Modules/Wiki/classes/class.ilWikiContributorsTableGUI.php");
776 $this->object->getId());
778 $tpl->setContent($table_gui->getHTML());
792 $users = (is_array(
$_POST[
"sel_user_id"]))
794 : (is_array(
$_POST[
"user_id"])
798 include_once(
"./Modules/Wiki/classes/class.ilWikiContributor.php");
799 include_once(
"./Services/Tracking/classes/class.ilLPMarks.php");
801 foreach($users as $user_id)
807 $marks_obj =
new ilLPMarks($this->object->getId(),$user_id);
810 $marks_obj->update();
819 $ilCtrl->redirect($this,
"listContributors");
827 if (is_object($this->
object))
829 $ilLocator->addItem($this->object->getTitle(),
836 global $ilAccess,
$ilErr,
$lng, $ilNavigationHistory;
838 $i = strpos($a_target,
"_");
841 $a_page = substr($a_target, $i+1);
842 $a_target = substr($a_target, 0, $i);
845 if ($ilAccess->checkAccess(
"read",
"", $a_target))
847 $_GET[
"cmd"] =
"viewPage";
848 $_GET[
"ref_id"] = $a_target;
849 $_GET[
"page"] = $a_page;
850 $_GET[
"baseClass"] =
"ilwikihandlergui";
851 $_GET[
"cmdClass"] =
"ilobjwikigui";
858 include(
"ilias.php");
861 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
865 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
872 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
885 $goto =
"goto.php?target=wiki_".$a_ref_id.
"_".
900 $ilTabs->clearTargets();
901 $tpl->setHeaderActionMenu(null);
903 $page = (
$_GET[
"page"] !=
"")
905 : $this->object->getStartPage();
906 $_GET[
"page"] = $page;
908 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
911 $page = $this->
object->getStartPage();
917 $ilCtrl->redirect($this,
"infoScreen");
924 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
927 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
929 $this->object->getStyleSheetId(),
"wiki"));
935 $ilCtrl->setCmdClass(
"ilwikipagegui");
936 $ilCtrl->setCmd(
"preview");
937 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
938 (!$ilAccess->checkAccess(
"edit_content",
"", $this->object->getRefId()) ||
939 $wpage_gui->getPageObject()->getBlocked()
942 $wpage_gui->setEnableEditing(
false);
950 $html = $ilCtrl->forwardCommand($wpage_gui);
953 $tpl->setContent($html);
965 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
973 $tpl->setContent($table_gui->getHTML());
985 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
993 $tpl->setContent($table_gui->getHTML());
1005 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1013 $tpl->setContent($table_gui->getHTML());
1027 $a_page =
$_GET[
"page"];
1030 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1041 $page->setWikiId($this->object->getId());
1044 if($this->object->getRating() && $this->
object->getRatingForNewPages())
1046 $page->setRating(
true);
1050 $page->setWikiRefId($this->object->getRefId());
1056 $ilCtrl->redirectByClass(
"ilwikipagegui",
"edit");
1069 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1083 include_once(
"./Modules/Wiki/classes/class.ilWikiRecentChangesTableGUI.php");
1088 $this->object->getId());
1091 $tpl->setContent($table_gui->getHTML());
1110 if ($a_wpg_id > 0 && !$a_wp)
1112 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1117 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php");
1119 $rcontent = $wiki_search_block->getHTML();
1135 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
1137 $rgui->setObject($wiki_id,
"wiki", $a_wpg_id,
"wpg");
1139 $rcontent .= $rgui->getBlockHTML($lng->txt(
"wiki_rate_page"));
1146 include_once(
"./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
1148 $rcontent.= $imp_pages_block->getHTML();
1154 include_once(
"./Modules/Wiki/classes/class.ilWikiFunctionsBlockGUI.php");
1156 $wiki_functions_block->setPageObject($a_wp);
1157 $rcontent .= $wiki_functions_block->getHTML();
1160 $tpl->setRightContent($rcontent);
1172 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1180 $tpl->setContent($table_gui->getHTML());
1190 switch (
$_POST[
"sel_type"])
1193 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1195 foreach ($pages as $p)
1197 $pg_ids[] = $p[
"id"];
1202 if (is_array(
$_POST[
"obj_id"]))
1204 $pg_ids =
$_POST[
"obj_id"];
1208 $pg_ids[] =
$_GET[
"wpg_id"];
1213 $pg_ids[] =
$_GET[
"wpg_id"];
1217 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1221 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1226 $tpl->setCurrentBlock(
"SyntaxStyle");
1227 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1229 $tpl->parseCurrentBlock();
1234 foreach ($pg_ids as $p_id)
1237 $page_gui->setOutputMode(
"print");
1238 $page_content.= $page_gui->showPage();
1240 $tpl->setVariable(
"CONTENT",
'<div class="ilInvisibleBorder">'.$page_content.
'</div>'.
1241 '<script type="text/javascript" language="javascript1.2">
1243 il.Util.addOnLoad(function () {
1261 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchResultsTableGUI.php");
1263 $ilTabs->setTabActive(
"wiki_search_results");
1265 if (trim(
$_POST[
"search_term"]) ==
"")
1268 $ilCtrl->redirectByClass(
"ilwikipagegui",
"preview");
1274 $this->object->getId(), $search_results);
1277 $tpl->setContent($table_gui->getHTML());
1296 $ctpl->setCurrentBlock(
"ContentStyle");
1297 $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1299 $ctpl->parseCurrentBlock();
1309 global $ilTabs,
$tpl;
1314 $tpl->setContent($this->form->getHTML());
1316 $ilTabs->activateTab(
"settings");
1329 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1330 $lng->loadLanguageModule(
"style");
1332 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1335 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
1336 $style_id = $this->
object->getStyleSheetId();
1338 if ($fixed_style > 0)
1342 $this->lng->txt(
"global_fixed").
")");
1343 $this->form->addItem($st);
1350 $st_styles[0] = $this->lng->txt(
"default");
1360 $this->form->addItem($st);
1365 $this->form->addCommandButton(
"editStyle",
1366 $lng->txt(
"style_edit_style"));
1367 $this->form->addCommandButton(
"deleteStyle",
1368 $lng->txt(
"style_delete_style"));
1376 $st_styles,
false,
true);
1377 $style_sel =
new ilSelectInputGUI($lng->txt(
"style_current_style"),
"style_id");
1379 $style_sel->setValue($style_id);
1380 $this->form->addItem($style_sel);
1382 $this->form->addCommandButton(
"saveStyleSettings",
1384 $this->form->addCommandButton(
"createStyle",
1385 $lng->txt(
"sty_create_ind_style"));
1388 $this->form->setTitle($lng->txt(
"wiki_style"));
1389 $this->form->setFormAction($ilCtrl->getFormAction($this));
1399 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1409 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1419 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1429 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1430 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
1432 || $this->object->getStyleSheetId() == 0))
1435 $this->
object->update();
1438 $this->ctrl->redirect($this,
"editStyleProperties");
1457 $ipages_ids = array();
1458 foreach ($ipages as $i)
1460 $ipages_ids[] = $i[
"page_id"];
1464 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1466 $options = array(
"" => $lng->txt(
"please_select"));
1467 foreach ($pages as $p)
1469 if (!in_array($p[
"id"], $ipages_ids))
1474 if (count($options) > 0)
1476 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1478 $si->setOptions($options);
1479 $si->setInfo($lng->txt(
""));
1480 $ilToolbar->addInputItem(
$si);
1481 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1482 $ilToolbar->addFormButton($lng->txt(
"add"),
"addImportantPage");
1486 $ilTabs->activateTab(
"settings");
1489 include_once(
"./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php");
1492 $tpl->setContent($imp_table->getHTML());
1507 if (
$_POST[
"imp_page_id"] > 0)
1509 $this->
object->addImportantPage((
int)
$_POST[
"imp_page_id"]);
1512 $ilCtrl->redirect($this,
"editImportantPages");
1522 if (!is_array(
$_POST[
"imp_page_id"]) || count(
$_POST[
"imp_page_id"]) == 0)
1525 $ilCtrl->redirect($this,
"editImportantPages");
1529 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1531 $cgui->setFormAction($ilCtrl->getFormAction($this));
1532 $cgui->setHeaderText($lng->txt(
"wiki_sure_remove_imp_pages"));
1533 $cgui->setCancel($lng->txt(
"cancel"),
"editImportantPages");
1534 $cgui->setConfirm($lng->txt(
"remove"),
"removeImportantPages");
1536 foreach (
$_POST[
"imp_page_id"] as $i)
1541 $tpl->setContent($cgui->getHTML());
1557 if (is_array(
$_POST[
"imp_page_id"]))
1559 foreach (
$_POST[
"imp_page_id"] as $i)
1561 $this->
object->removeImportantPage((
int) $i);
1565 $ilCtrl->redirect($this,
"editImportantPages");
1580 $this->
object->saveOrderingAndIndentation(
$_POST[
"ord"],
$_POST[
"indent"]);
1582 $ilCtrl->redirect($this,
"editImportantPages");
1590 require_once(
"./Modules/Wiki/classes/class.ilWikiHTMLExport.php");
1592 $cont_exp->buildExportFile();
1604 include_once
"Modules/Wiki/classes/class.ilWikiPage.php";
1606 if($page->getWikiId() == $a_wiki_id)
1608 return $page->getTitle();
1621 include_once
"Modules/Wiki/classes/class.ilWikiPage.php";