4 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
26 $this->ctrl = $DIC->ctrl();
27 $this->lng = $DIC->language();
28 $this->
user = $DIC->user();
29 $this->access = $DIC->access();
30 $lng = $DIC->language();
32 parent::__construct();
34 $lng->loadLanguageModule(
"wiki");
38 $this->allow_moving =
false;
40 $this->ref_id = (int)
$_GET[
"ref_id"];
48 return self::$block_type;
74 $next_class =
$ilCtrl->getNextClass();
75 $cmd =
$ilCtrl->getCmd(
"getHTML");
77 switch ($next_class) {
90 $this->pageob = $a_pageob;
100 return $this->pageob;
112 return parent::getHTML();
124 $tpl =
new ilTemplate(
"tpl.wiki_side_block_content.html",
true,
true,
"Modules/Wiki");
130 "txt" =>
$lng->txt(
"info_short"),
131 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"infoScreen")
136 "txt" =>
$lng->txt(
"wiki_recent_changes"),
137 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"recentChanges")
140 foreach ($actions as $a) {
141 $tpl->setCurrentBlock(
"action");
142 $tpl->setVariable(
"HREF", $a[
"href"]);
143 $tpl->setVariable(
"TXT", $a[
"txt"]);
144 $tpl->parseCurrentBlock();
146 $tpl->touchBlock(
"item");
154 "txt" =>
$lng->txt(
"wiki_all_pages"),
155 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"allPages")
160 "txt" =>
$lng->txt(
"wiki_new_pages"),
161 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"newPages")
166 "txt" =>
$lng->txt(
"wiki_popular_pages"),
167 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"popularPages")
172 "txt" =>
$lng->txt(
"wiki_orphaned_pages"),
173 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"orphanedPages")
178 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
180 $list->setListTitle(
$lng->txt(
"wiki_page_lists"));
182 $list->setId(
"wiki_pglists");
184 foreach ($actions as $a) {
191 $tpl->setCurrentBlock(
"plain");
192 $tpl->setVariable(
"PLAIN",
$list->getHTML());
193 $tpl->parseCurrentBlock();
194 $tpl->touchBlock(
"item");
200 $list->setListTitle(
$lng->txt(
"wiki_page_actions"));
201 $list->setId(
"wiki_pgactions");
203 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
208 $lng->txt(
"wiki_activate_page_rating"),
210 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"activateWikiPageRating")
214 $lng->txt(
"wiki_deactivate_page_rating"),
216 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deactivateWikiPageRating")
222 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
223 $ilAccess->checkAccess(
"edit_page_meta",
"", $this->ref_id)) {
225 include_once
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
229 $lng->txt(
"wiki_unhide_meta_adv_records"),
231 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unhideAdvancedMetaData")
236 if (($ilAccess->checkAccess(
"edit_content",
"", $this->ref_id) && !$this->
getPageObject()->getBlocked())
237 || $ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
240 $lng->txt(
"wiki_rename_page"),
242 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"renameWikiPage")
246 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
251 $lng->txt(
"wiki_unblock_page"),
253 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unblockWikiPage")
257 $lng->txt(
"wiki_block_page"),
259 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"blockWikiPage")
264 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
270 $lng->txt(
"wiki_delete_page"),
272 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deleteWikiPageConfirmationScreen")
277 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
278 include_once
"Modules/Wiki/classes/class.ilWikiPageTemplate.php";
280 if (!$wpt->isPageTemplate($this->getPageObject()->getId())) {
282 $lng->txt(
"wiki_add_template"),
284 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"addPageTemplateFromPageAction")
288 $lng->txt(
"wiki_remove_template_status"),
290 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"removePageTemplateFromPageAction")
295 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
296 $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
297 $tpl->setCurrentBlock(
"plain");
298 $tpl->setVariable(
"PLAIN",
$list->getHTML());
299 $tpl->parseCurrentBlock();
300 $tpl->touchBlock(
"item");
315 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
317 "txt" =>
$lng->txt(
"wiki_contributors"),
318 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"listContributors")
325 "txt" =>
$lng->txt(
"wiki_html_export"),
326 "id" =>
"il_wiki_user_export",
327 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"initUserHTMLExport")
332 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
334 "txt" =>
$lng->txt(
"settings"),
335 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"editSettings")
337 } elseif ($ilAccess->checkAccess(
'statistics_read',
"", $this->ref_id)) {
339 "txt" =>
$lng->txt(
"statistics"),
340 "href" =>
$ilCtrl->getLinkTargetByClass(array(
"ilobjwikigui",
"ilwikistatgui"),
"initial")
344 foreach ($actions as $a) {
345 $tpl->setCurrentBlock(
"action");
346 $tpl->setVariable(
"HREF", $a[
"href"]);
347 $tpl->setVariable(
"TXT", $a[
"txt"]);
348 if ($a[
"id"] !=
"") {
349 $tpl->setVariable(
"ACT_ID",
"id='" . $a[
"id"] .
"'");
351 $tpl->parseCurrentBlock();
353 $tpl->touchBlock(
"item");
if(isset($_REQUEST['delete'])) $list
executeCommand()
execute command
getHTML()
Get bloch HTML code.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
fillDataSection()
Fill data section.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
static _lookupStartPage($a_wiki_id)
Lookup start page.
getPageObject()
Get Page Object.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
__construct()
Constructor.
static lookupAdvancedMetadataHidden($a_page_id)
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
BlockGUI class for wiki functions block.
static _lookupRating($a_wiki_id)
Lookup whether rating is activated.
setTitle($a_title)
Set Title.
special template class to simplify handling of ITX/PEAR
static getScreenMode()
Get Screen Mode for current command.
User interface class for advanced drop-down selection lists.
This class represents a block method of a block.
setPageObject($a_pageob)
Set Page Object.