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);
150 $ilTabs->activateTab(
"settings");
152 include_once(
"Services/Rating/classes/class.ilRatingGUI.php");
154 $gui->setObject($this->object->getId(), $this->
object->getType());
155 $gui->setExportCallback(array($this,
"getSubObjectTitle"), $this->lng->txt(
"page"));
156 $this->ctrl->forwardCommand($gui);
166 if (
$cmd !=
"infoScreenObject")
188 if (is_object($this->
object))
209 $forms = array(self::CFORM_NEW => $this->form_gui,
225 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
229 if ($this->form_gui->checkInput())
233 $short_item = $this->form_gui->getItemByPostVar(
"shorttitle");
234 $short_item->setAlert($lng->txt(
"wiki_short_title_already_in_use"));
239 $_POST[
"title"] = $this->form_gui->getInput(
"title");
240 $_POST[
"desc"] = $this->form_gui->getInput(
"description");
245 $this->form_gui->setValuesByPost();
246 $tpl->setContent($this->form_gui->getHtml());
257 $newObj->setTitle($this->form_gui->getInput(
"title"));
258 $newObj->setDescription($this->form_gui->getInput(
"description"));
259 $newObj->setIntroduction($this->form_gui->getInput(
"intro"));
260 $newObj->setStartPage($this->form_gui->getInput(
"startpage"));
261 $newObj->setShortTitle($this->form_gui->getInput(
"shorttitle"));
262 $newObj->setRating($this->form_gui->getInput(
"rating"));
264 $newObj->setRatingForNewPages($this->form_gui->getInput(
"rating_new"));
265 $newObj->setRatingCategories($this->form_gui->getInput(
"rating_ext"));
267 $newObj->setRatingOverall($this->form_gui->getInput(
"rating_overall"));
268 $newObj->setPageToc($this->form_gui->getInput(
"page_toc"));
272 if (!$ilSetting->get(
"disable_comments"))
274 $newObj->setPublicNotes($this->form_gui->getInput(
"public_notes"));
276 $newObj->setOnline($this->form_gui->getInput(
"online"));
292 $this->ctrl->setCmd(
"showSummary");
293 $this->ctrl->setCmdClass(
"ilinfoscreengui");
304 $ilTabs->activateTab(
"info_short");
306 if (!$ilAccess->checkAccess(
"visible",
"", $this->object->getRefId()))
308 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
311 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
313 $info->enablePrivateNotes();
314 if (trim($this->object->getIntroduction()) !=
"")
316 $info->addSection($lng->txt(
"wiki_introduction"));
317 $info->addProperty(
"", nl2br($this->object->getIntroduction()));
321 include_once(
"./Modules/Wiki/classes/class.ilWikiContributor.php");
322 include_once(
"./Services/Tracking/classes/class.ilLPMarks.php");
328 $info->addSection($this->lng->txt(
"wiki_feedback_from_tutor"));
329 if ($lpcomment !=
"")
331 $info->addProperty($this->lng->txt(
"wiki_comment"),
336 $info->addProperty($this->lng->txt(
"wiki_mark"),
342 $info->addProperty($this->lng->txt(
"status"),
343 $this->lng->txt(
"wiki_passed"));
347 $info->addProperty($this->lng->txt(
"status"),
348 $this->lng->txt(
"wiki_failed"));
360 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
366 $this->lng->loadLanguageModule(
"meta");
367 $this->lng->loadLanguageModule(
"wiki");
374 $this->ctrl->forwardCommand($info);
376 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
399 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
400 $ilCtrl->setParameter($this,
"wpg_id",
403 $ilTabs->addTarget(
"wiki_what_links_here",
404 $this->ctrl->getLinkTargetByClass(
"ilwikipagegui",
405 "whatLinksHere"),
"whatLinksHere");
409 $ilTabs->addTarget(
"wiki_print_view",
410 $this->ctrl->getLinkTargetByClass(
"ilwikipagegui",
411 "printViewSelection"),
"printViewSelection");
421 $ilTabs->activateTab(
"wiki_pages");
423 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
424 $ilCtrl->setParameter($this,
"wpg_id",
428 $ilTabs->addSubTabTarget(
"wiki_all_pages",
429 $this->ctrl->getLinkTarget($this,
"allPages"),
"allPages");
430 $ilTabs->addSubTabTarget(
"wiki_recent_changes",
431 $this->ctrl->getLinkTarget($this,
"recentChanges"),
"recentChanges");
432 $ilTabs->addSubTabTarget(
"wiki_new_pages",
433 $this->ctrl->getLinkTarget($this,
"newPages"),
"newPages");
434 $ilTabs->addSubTabTarget(
"wiki_popular_pages",
435 $this->ctrl->getLinkTarget($this,
"popularPages"),
"popularPages");
436 $ilTabs->addSubTabTarget(
"wiki_orphaned_pages",
437 $this->ctrl->getLinkTarget($this,
"orphanedPages"),
"orphanedPages");
449 $ilHelp->setScreenIdComponent(
"wiki");
452 if (in_array($ilCtrl->getCmdClass(), array(
"",
"ilobjwikigui",
453 "ilinfoscreengui",
"ilpermissiongui",
"ilexportgui",
"ilratingcategorygui")))
455 if (
$_GET[
"page"] !=
"")
457 $tabs_gui->setBackTarget($lng->txt(
"wiki_last_visited_page"),
463 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()))
465 $ilTabs->addTab(
"wiki_pages",
466 $lng->txt(
"wiki_pages"),
467 $this->ctrl->getLinkTarget($this,
"allPages"));
471 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
473 $ilTabs->addTab(
"info_short",
474 $lng->txt(
"info_short"),
475 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
479 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId()))
481 $ilTabs->addTab(
"settings",
482 $lng->txt(
"settings"),
483 $this->ctrl->getLinkTarget($this,
"editSettings"));
487 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId()))
489 $ilTabs->addTab(
"wiki_contributors",
490 $lng->txt(
"wiki_contributors"),
491 $this->ctrl->getLinkTarget($this,
"listContributors"));
494 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
496 $ilTabs->addTab(
"export",
498 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
503 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
505 $ilTabs->addTab(
"perm_settings",
506 $lng->txt(
"perm_settings"),
507 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
519 if (in_array($a_active,
520 array(
"general_settings",
"style",
"imp_pages",
"rating_categories")))
523 $ilTabs->addSubTab(
"general_settings",
524 $lng->txt(
"wiki_general_settings"),
525 $ilCtrl->getLinkTarget($this,
'editSettings'));
528 $ilTabs->addSubTab(
"style",
529 $lng->txt(
"wiki_style"),
530 $ilCtrl->getLinkTarget($this,
'editStyleProperties'));
533 $ilTabs->addSubTab(
"imp_pages",
534 $lng->txt(
"wiki_navigation"),
535 $ilCtrl->getLinkTarget($this,
'editImportantPages'));
538 if($this->object->getRating() && $this->
object->getRatingCategories())
540 $lng->loadLanguageModule(
"rating");
541 $ilTabs->addSubTab(
"rating_categories",
542 $lng->txt(
"rating_categories"),
543 $ilCtrl->getLinkTargetByClass(array(
'ilratinggui',
'ilratingcategorygui'),
''));
546 $ilTabs->activateSubTab($a_active);
565 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
567 $ecs->addSettingsToForm($this->form_gui,
'wiki');
569 $tpl->setContent($this->form_gui->getHtml());
580 $lng->loadLanguageModule(
"wiki");
581 $ilTabs->activateTab(
"settings");
583 include(
"Services/Form/classes/class.ilPropertyFormGUI.php");
589 $this->form_gui->addItem($tit);
607 $this->form_gui->addItem($des);
613 $this->form_gui->addItem($intro);
616 $sp =
new ilTextInputGUI($lng->txt(
"wiki_start_page"),
"startpage");
617 if ($a_mode ==
"edit")
619 $sp->
setInfo($lng->txt(
"wiki_start_page_info"));
621 $sp->setMaxLength(200);
622 $sp->setRequired(
true);
623 $this->form_gui->addItem($sp);
627 $this->form_gui->addItem($online);
632 $lng->loadLanguageModule(
'rating');
633 $rate =
new ilCheckboxInputGUI($lng->txt(
'rating_activate_rating'),
'rating_overall');
634 $rate->
setInfo($lng->txt(
'rating_activate_rating_info'));
635 $this->form_gui->addItem($rate);
638 $this->form_gui->addItem($rating);
645 $new =
new ilCheckboxInputGUI($lng->txt(
"wiki_activate_new_page_rating"),
"rating_new");
648 $extended =
new ilCheckboxInputGUI($lng->txt(
"wiki_activate_extended_rating"),
"rating_ext");
653 if (!$ilSetting->get(
"disable_comments"))
655 $comments =
new ilCheckboxInputGUI($lng->txt(
"wiki_public_comments"),
"public_notes");
656 $this->form_gui->addItem($comments);
665 $page_toc->
setInfo($lng->txt(
"wiki_page_toc_info"));
666 $this->form_gui->addItem($page_toc);
670 if ($a_mode !=
"create")
672 $this->form_gui->setTitle($lng->txt(
"wiki_settings"));
673 $this->form_gui->addCommandButton(
"saveSettings", $lng->txt(
"save"));
677 $this->form_gui->setTitle($lng->txt(
"wiki_new"));
678 $this->form_gui->addCommandButton(
"save", $lng->txt(
"wiki_add"));
679 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
683 if ($a_mode ==
"create")
685 $ilCtrl->setParameter($this,
"new_type",
"wiki");
688 $this->form_gui->setFormAction($ilCtrl->getFormAction($this,
"saveSettings"));
696 if ($a_mode ==
"create")
698 $values[
"startpage"] = $lng->txt(
"wiki_main_page");
699 $values[
"rating_new"] =
true;
703 $this->form_gui->setValuesByArray($values);
707 $values[
"online"] = $this->
object->getOnline();
708 $values[
"title"] = $this->
object->getTitle();
709 $values[
"startpage"] = $this->
object->getStartPage();
710 $values[
"shorttitle"] = $this->
object->getShortTitle();
711 $values[
"description"] = $this->
object->getLongDescription();
712 $values[
"rating_overall"] = $this->
object->getRatingOverall();
713 $values[
"rating"] = $this->
object->getRating();
715 $values[
"rating_new"] = $this->
object->getRatingForNewPages();
716 $values[
"rating_ext"] = $this->
object->getRatingCategories();
717 $values[
"public_notes"] = $this->
object->getPublicNotes();
718 $values[
"intro"] = $this->
object->getIntroduction();
720 $values[
"page_toc"] = $this->
object->getPageToc();
722 $this->form_gui->setValuesByArray($values);
738 if ($this->form_gui->checkInput())
741 $this->form_gui->getInput(
"shorttitle") != $this->
object->getShortTitle())
743 $short_item = $this->form_gui->getItemByPostVar(
"shorttitle");
744 $short_item->setAlert($lng->txt(
"wiki_short_title_already_in_use"));
748 $this->
object->setTitle($this->form_gui->getInput(
"title"));
749 $this->
object->setDescription($this->form_gui->getInput(
"description"));
750 $this->
object->setOnline($this->form_gui->getInput(
"online"));
751 $this->
object->setStartPage($this->form_gui->getInput(
"startpage"));
752 $this->
object->setShortTitle($this->form_gui->getInput(
"shorttitle"));
753 $this->
object->setRatingOverall($this->form_gui->getInput(
"rating_overall"));
754 $this->
object->setRating($this->form_gui->getInput(
"rating"));
756 $this->
object->setRatingForNewPages($this->form_gui->getInput(
"rating_new"));
757 $this->
object->setRatingCategories($this->form_gui->getInput(
"rating_ext"));
759 if (!$ilSetting->get(
"disable_comments"))
761 $this->
object->setPublicNotes($this->form_gui->getInput(
"public_notes"));
763 $this->
object->setIntroduction($this->form_gui->getInput(
"intro"));
765 $this->
object->setPageToc($this->form_gui->getInput(
"page_toc"));
766 $this->
object->update();
769 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
771 if($ecs->handleSettingsUpdate())
774 $ilCtrl->redirect($this,
"editSettings");
779 $this->form_gui->setValuesByPost();
780 $this->tpl->setContent($this->form_gui->getHTML());
788 global
$tpl, $ilTabs;
791 $ilTabs->activateTab(
"wiki_contributors");
793 include_once(
"./Modules/Wiki/classes/class.ilWikiContributorsTableGUI.php");
796 $this->object->getId());
798 $tpl->setContent($table_gui->getHTML());
812 $users = (is_array(
$_POST[
"user_id"])
816 include_once(
"./Modules/Wiki/classes/class.ilWikiContributor.php");
817 include_once(
"./Services/Tracking/classes/class.ilLPMarks.php");
819 foreach($users as $user_id)
823 $marks_obj =
new ilLPMarks($this->object->getId(),$user_id);
828 if ($marks_obj->getMark() != $new_mark ||
833 $marks_obj->setMark($new_mark);
834 $marks_obj->setComment($new_comment);
835 $marks_obj->update();
845 $ilCtrl->redirect($this,
"listContributors");
853 if (is_object($this->
object))
855 $ilLocator->addItem($this->object->getTitle(),
862 global $ilAccess,
$ilErr,
$lng, $ilNavigationHistory;
864 $i = strpos($a_target,
"_");
867 $a_page = substr($a_target, $i+1);
868 $a_target = substr($a_target, 0, $i);
871 if ($a_target ==
"wpage")
873 $wpg_id = (int) $a_page;
874 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
877 foreach ($refs as $r)
879 if ($ilAccess->checkAccess(
"read",
"", $r))
887 if ($ilAccess->checkAccess(
"read",
"", $a_target))
889 $_GET[
"cmd"] =
"viewPage";
890 $_GET[
"ref_id"] = $a_target;
891 $_GET[
"page"] = $a_page;
892 $_GET[
"baseClass"] =
"ilwikihandlergui";
893 $_GET[
"cmdClass"] =
"ilobjwikigui";
900 include(
"ilias.php");
903 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
907 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
914 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
927 $goto =
"goto.php?target=wiki_".$a_ref_id.
"_".
942 $ilTabs->clearTargets();
943 $tpl->setHeaderActionMenu(null);
945 $page = (
$_GET[
"page"] !=
"")
947 : $this->object->getStartPage();
948 $_GET[
"page"] = $page;
950 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
953 $page = $this->
object->getStartPage();
959 $ilCtrl->redirect($this,
"infoScreen");
966 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
969 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
971 $this->object->getStyleSheetId(),
"wiki"));
977 $ilCtrl->setCmdClass(
"ilwikipagegui");
978 $ilCtrl->setCmd(
"preview");
979 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
980 (!$ilAccess->checkAccess(
"edit_content",
"", $this->object->getRefId()) ||
981 $wpage_gui->getPageObject()->getBlocked()
984 $wpage_gui->setEnableEditing(
false);
992 $html = $ilCtrl->forwardCommand($wpage_gui);
995 $tpl->setContent($html);
1007 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1015 $tpl->setContent($table_gui->getHTML());
1027 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1035 $tpl->setContent($table_gui->getHTML());
1047 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1055 $tpl->setContent($table_gui->getHTML());
1069 $a_page =
$_GET[
"page"];
1072 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1083 $page->setWikiId($this->object->getId());
1086 if($this->object->getRating() && $this->
object->getRatingForNewPages())
1088 $page->setRating(
true);
1092 $page->setWikiRefId($this->object->getRefId());
1098 $ilCtrl->redirectByClass(
"ilwikipagegui",
"edit");
1111 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1125 include_once(
"./Modules/Wiki/classes/class.ilWikiRecentChangesTableGUI.php");
1130 $this->object->getId());
1133 $tpl->setContent($table_gui->getHTML());
1152 if ($a_wpg_id > 0 && !$a_wp)
1154 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1159 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php");
1161 $rcontent = $wiki_search_block->getHTML();
1177 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
1179 $rgui->setObject($wiki_id,
"wiki", $a_wpg_id,
"wpg");
1181 $rgui->setYourRatingText(
"#");
1182 $rcontent .= $rgui->getBlockHTML($lng->txt(
"wiki_rate_page"));
1189 include_once(
"./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
1191 $rcontent.= $imp_pages_block->getHTML();
1197 include_once(
"./Modules/Wiki/classes/class.ilWikiFunctionsBlockGUI.php");
1199 $wiki_functions_block->setPageObject($a_wp);
1200 $rcontent .= $wiki_functions_block->getHTML();
1203 $tpl->setRightContent($rcontent);
1215 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1223 $tpl->setContent($table_gui->getHTML());
1233 switch (
$_POST[
"sel_type"])
1236 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1238 foreach ($pages as $p)
1240 $pg_ids[] = $p[
"id"];
1245 if (is_array(
$_POST[
"obj_id"]))
1247 $pg_ids =
$_POST[
"obj_id"];
1251 $pg_ids[] =
$_GET[
"wpg_id"];
1256 $pg_ids[] =
$_GET[
"wpg_id"];
1260 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1264 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1269 $tpl->setCurrentBlock(
"SyntaxStyle");
1270 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1272 $tpl->parseCurrentBlock();
1277 foreach ($pg_ids as $p_id)
1280 $page_gui->setOutputMode(
"print");
1281 $page_content.= $page_gui->showPage();
1283 $tpl->setVariable(
"CONTENT",
'<div class="ilInvisibleBorder">'.$page_content.
'</div>'.
1284 '<script type="text/javascript" language="javascript1.2">
1286 il.Util.addOnLoad(function () {
1304 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchResultsTableGUI.php");
1306 $ilTabs->setTabActive(
"wiki_search_results");
1308 if (trim(
$_POST[
"search_term"]) ==
"")
1311 $ilCtrl->redirectByClass(
"ilwikipagegui",
"preview");
1317 $this->object->getId(), $search_results,
$_POST[
"search_term"]);
1320 $tpl->setContent($table_gui->getHTML());
1339 $ctpl->setCurrentBlock(
"ContentStyle");
1340 $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1342 $ctpl->parseCurrentBlock();
1352 global $ilTabs,
$tpl;
1357 $tpl->setContent($this->form->getHTML());
1359 $ilTabs->activateTab(
"settings");
1372 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1373 $lng->loadLanguageModule(
"style");
1375 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1378 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
1379 $style_id = $this->
object->getStyleSheetId();
1381 if ($fixed_style > 0)
1385 $this->lng->txt(
"global_fixed").
")");
1386 $this->form->addItem($st);
1393 $st_styles[0] = $this->lng->txt(
"default");
1403 $this->form->addItem($st);
1408 $this->form->addCommandButton(
"editStyle",
1409 $lng->txt(
"style_edit_style"));
1410 $this->form->addCommandButton(
"deleteStyle",
1411 $lng->txt(
"style_delete_style"));
1419 $st_styles,
false,
true);
1420 $style_sel =
new ilSelectInputGUI($lng->txt(
"style_current_style"),
"style_id");
1422 $style_sel->setValue($style_id);
1423 $this->form->addItem($style_sel);
1425 $this->form->addCommandButton(
"saveStyleSettings",
1427 $this->form->addCommandButton(
"createStyle",
1428 $lng->txt(
"sty_create_ind_style"));
1431 $this->form->setTitle($lng->txt(
"wiki_style"));
1432 $this->form->setFormAction($ilCtrl->getFormAction($this));
1442 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1452 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1462 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1472 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1473 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
1475 || $this->object->getStyleSheetId() == 0))
1478 $this->
object->update();
1481 $this->ctrl->redirect($this,
"editStyleProperties");
1500 $ipages_ids = array();
1501 foreach ($ipages as $i)
1503 $ipages_ids[] = $i[
"page_id"];
1507 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1509 $options = array(
"" => $lng->txt(
"please_select"));
1510 foreach ($pages as $p)
1512 if (!in_array($p[
"id"], $ipages_ids))
1517 if (count($options) > 0)
1519 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1521 $si->setOptions($options);
1522 $si->setInfo($lng->txt(
""));
1523 $ilToolbar->addInputItem(
$si);
1524 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1525 $ilToolbar->addFormButton($lng->txt(
"add"),
"addImportantPage");
1529 $ilTabs->activateTab(
"settings");
1532 include_once(
"./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php");
1535 $tpl->setContent($imp_table->getHTML());
1550 if (
$_POST[
"imp_page_id"] > 0)
1552 $this->
object->addImportantPage((
int)
$_POST[
"imp_page_id"]);
1555 $ilCtrl->redirect($this,
"editImportantPages");
1565 if (!is_array(
$_POST[
"imp_page_id"]) || count(
$_POST[
"imp_page_id"]) == 0)
1568 $ilCtrl->redirect($this,
"editImportantPages");
1572 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1574 $cgui->setFormAction($ilCtrl->getFormAction($this));
1575 $cgui->setHeaderText($lng->txt(
"wiki_sure_remove_imp_pages"));
1576 $cgui->setCancel($lng->txt(
"cancel"),
"editImportantPages");
1577 $cgui->setConfirm($lng->txt(
"remove"),
"removeImportantPages");
1579 foreach (
$_POST[
"imp_page_id"] as $i)
1584 $tpl->setContent($cgui->getHTML());
1600 if (is_array(
$_POST[
"imp_page_id"]))
1602 foreach (
$_POST[
"imp_page_id"] as $i)
1604 $this->
object->removeImportantPage((
int) $i);
1608 $ilCtrl->redirect($this,
"editImportantPages");
1623 $this->
object->saveOrderingAndIndentation(
$_POST[
"ord"],
$_POST[
"indent"]);
1625 $ilCtrl->redirect($this,
"editImportantPages");
1633 require_once(
"./Modules/Wiki/classes/class.ilWikiHTMLExport.php");
1635 $cont_exp->buildExportFile();
1647 include_once
"Modules/Wiki/classes/class.ilWikiPage.php";
1649 if($page->getWikiId() == $a_wiki_id)
1651 return $page->getTitle();
1664 include_once
"Modules/Wiki/classes/class.ilWikiPage.php";