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"];
50 return self::$block_type;
78 $next_class =
$ilCtrl->getNextClass();
79 $cmd =
$ilCtrl->getCmd(
"getHTML");
81 switch ($next_class) {
94 $this->pageob = $a_pageob;
104 return $this->pageob;
116 return parent::getHTML();
128 $tpl =
new ilTemplate(
"tpl.wiki_side_block_content.html",
true,
true,
"Modules/Wiki");
134 "txt" =>
$lng->txt(
"info_short"),
135 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"infoScreen")
140 "txt" =>
$lng->txt(
"wiki_recent_changes"),
141 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"recentChanges")
144 foreach ($actions as $a) {
145 $tpl->setCurrentBlock(
"action");
146 $tpl->setVariable(
"HREF", $a[
"href"]);
147 $tpl->setVariable(
"TXT", $a[
"txt"]);
148 $tpl->parseCurrentBlock();
150 $tpl->touchBlock(
"item");
158 "txt" =>
$lng->txt(
"wiki_all_pages"),
159 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"allPages")
164 "txt" =>
$lng->txt(
"wiki_new_pages"),
165 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"newPages")
170 "txt" =>
$lng->txt(
"wiki_popular_pages"),
171 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"popularPages")
176 "txt" =>
$lng->txt(
"wiki_orphaned_pages"),
177 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"orphanedPages")
182 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
184 $list->setListTitle(
$lng->txt(
"wiki_page_lists"));
186 $list->setId(
"wiki_pglists");
188 foreach ($actions as $a) {
195 $tpl->setCurrentBlock(
"plain");
196 $tpl->setVariable(
"PLAIN",
$list->getHTML());
197 $tpl->parseCurrentBlock();
198 $tpl->touchBlock(
"item");
204 $list->setListTitle(
$lng->txt(
"wiki_page_actions"));
205 $list->setId(
"wiki_pgactions");
207 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
212 $lng->txt(
"wiki_activate_page_rating"),
214 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"activateWikiPageRating")
218 $lng->txt(
"wiki_deactivate_page_rating"),
220 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deactivateWikiPageRating")
226 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
227 $ilAccess->checkAccess(
"edit_page_meta",
"", $this->ref_id)) {
229 include_once
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
233 $lng->txt(
"wiki_unhide_meta_adv_records"),
235 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unhideAdvancedMetaData")
240 if (($ilAccess->checkAccess(
"edit_content",
"", $this->ref_id) && !$this->
getPageObject()->getBlocked())
241 || $ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
244 $lng->txt(
"wiki_rename_page"),
246 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"renameWikiPage")
250 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
255 $lng->txt(
"wiki_unblock_page"),
257 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unblockWikiPage")
261 $lng->txt(
"wiki_block_page"),
263 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"blockWikiPage")
268 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
274 $lng->txt(
"wiki_delete_page"),
276 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deleteWikiPageConfirmationScreen")
281 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
282 include_once
"Modules/Wiki/classes/class.ilWikiPageTemplate.php";
284 if (!$wpt->isPageTemplate($this->getPageObject()->getId())) {
286 $lng->txt(
"wiki_add_template"),
288 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"addPageTemplateFromPageAction")
292 $lng->txt(
"wiki_remove_template_status"),
294 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"removePageTemplateFromPageAction")
299 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
300 $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
301 $tpl->setCurrentBlock(
"plain");
302 $tpl->setVariable(
"PLAIN",
$list->getHTML());
303 $tpl->parseCurrentBlock();
304 $tpl->touchBlock(
"item");
319 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
321 "txt" =>
$lng->txt(
"wiki_contributors"),
322 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"listContributors")
329 "txt" =>
$lng->txt(
"wiki_html_export"),
330 "id" =>
"il_wiki_user_export",
331 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"initUserHTMLExport")
336 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
338 "txt" =>
$lng->txt(
"settings"),
339 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"editSettings")
341 } elseif ($ilAccess->checkAccess(
'statistics_read',
"", $this->ref_id)) {
343 "txt" =>
$lng->txt(
"statistics"),
344 "href" =>
$ilCtrl->getLinkTargetByClass(
array(
"ilobjwikigui",
"ilwikistatgui"),
"initial")
348 foreach ($actions as $a) {
349 $tpl->setCurrentBlock(
"action");
350 $tpl->setVariable(
"HREF", $a[
"href"]);
351 $tpl->setVariable(
"TXT", $a[
"txt"]);
352 if ($a[
"id"] !=
"") {
353 $tpl->setVariable(
"ACT_ID",
"id='" . $a[
"id"] .
"'");
355 $tpl->parseCurrentBlock();
357 $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.
static isRepositoryObject()
Is this a repository object.
special template class to simplify handling of ITX/PEAR
static getScreenMode()
Get Screen Mode for current command.
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
static getBlockType()
Get block type.
This class represents a block method of a block.
setPageObject($a_pageob)
Set Page Object.