4 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
26 parent::__construct();
28 $lng->loadLanguageModule(
"wiki");
31 $this->
setTitle($lng->txt(
"wiki_functions"));
32 $this->allow_moving =
false;
42 return self::$block_type;
70 $next_class = $ilCtrl->getNextClass();
71 $cmd = $ilCtrl->getCmd(
"getHTML");
87 $this->pageob = $a_pageob;
107 return parent::getHTML();
117 $tpl =
new ilTemplate(
"tpl.wiki_side_block_content.html",
true,
true,
"Modules/Wiki");
123 "txt" => $lng->txt(
"info_short"),
124 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"infoScreen")
129 "txt" => $lng->txt(
"wiki_recent_changes"),
130 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"recentChanges")
133 foreach ($actions as $a)
135 $tpl->setCurrentBlock(
"action");
136 $tpl->setVariable(
"HREF", $a[
"href"]);
137 $tpl->setVariable(
"TXT", $a[
"txt"]);
138 $tpl->parseCurrentBlock();
140 $tpl->touchBlock(
"item");
148 "txt" => $lng->txt(
"wiki_all_pages"),
149 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"allPages")
154 "txt" => $lng->txt(
"wiki_new_pages"),
155 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"newPages")
160 "txt" => $lng->txt(
"wiki_popular_pages"),
161 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"popularPages")
166 "txt" => $lng->txt(
"wiki_orphaned_pages"),
167 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"orphanedPages")
172 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
174 $list->setListTitle($lng->txt(
"wiki_page_lists"));
176 $list->setId(
"wiki_pglists");
178 foreach ($actions as $a)
180 $list->addItem($a[
"txt"],
"",
183 $tpl->setCurrentBlock(
"plain");
184 $tpl->setVariable(
"PLAIN", $list->getHTML());
185 $tpl->parseCurrentBlock();
186 $tpl->touchBlock(
"item");
192 $list->setListTitle($lng->txt(
"wiki_page_actions"));
193 $list->setId(
"wiki_pgactions");
195 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
202 $list->addItem($lng->txt(
"wiki_activate_page_rating"),
"",
203 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"activateWikiPageRating"));
207 $list->addItem($lng->txt(
"wiki_deactivate_page_rating"),
"",
208 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deactivateWikiPageRating"));
213 include_once
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
217 $list->addItem($lng->txt(
"wiki_unhide_meta_adv_records"),
"",
218 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unhideAdvancedMetaData"));
222 if (($ilAccess->checkAccess(
"edit_content",
"",
$_GET[
"ref_id"]) && !$this->
getPageObject()->getBlocked())
223 || $ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
226 $list->addItem($lng->txt(
"wiki_rename_page"),
"",
227 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"renameWikiPage"));
230 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
236 $list->addItem($lng->txt(
"wiki_unblock_page"),
"",
237 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unblockWikiPage"));
241 $list->addItem($lng->txt(
"wiki_block_page"),
"",
242 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"blockWikiPage"));
246 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
253 $list->addItem($lng->txt(
"wiki_delete_page"),
"",
254 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deleteWikiPageConfirmationScreen"));
258 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
261 include_once
"Modules/Wiki/classes/class.ilWikiPageTemplate.php";
263 if(!$wpt->isPageTemplate($this->getPageObject()->getId()))
265 $list->addItem($lng->txt(
"wiki_add_template"),
"",
266 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"addPageTemplateFromPageAction"));
270 $list->addItem($lng->txt(
"wiki_remove_template_status"),
"",
271 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"removePageTemplateFromPageAction"));
275 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) ||
276 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
278 $tpl->setCurrentBlock(
"plain");
279 $tpl->setVariable(
"PLAIN", $list->getHTML());
280 $tpl->parseCurrentBlock();
281 $tpl->touchBlock(
"item");
296 if ($ilAccess->checkAccess(
'write',
"",
$_GET[
"ref_id"]))
299 "txt" => $lng->txt(
"wiki_contributors"),
300 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"listContributors")
308 "txt" => $lng->txt(
"wiki_html_export"),
309 "id" =>
"il_wiki_user_export",
310 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"initUserHTMLExport")
315 if ($ilAccess->checkAccess(
'write',
"",
$_GET[
"ref_id"]))
318 "txt" => $lng->txt(
"settings"),
319 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"editSettings")
322 else if ($ilAccess->checkAccess(
'statistics_read',
"",
$_GET[
"ref_id"]))
325 "txt" => $lng->txt(
"statistics"),
326 "href" => $ilCtrl->getLinkTargetByClass(
array(
"ilobjwikigui",
"ilwikistatgui"),
"initial")
330 foreach ($actions as $a)
332 $tpl->setCurrentBlock(
"action");
333 $tpl->setVariable(
"HREF", $a[
"href"]);
334 $tpl->setVariable(
"TXT", $a[
"txt"]);
337 $tpl->setVariable(
"ACT_ID",
"id='".$a[
"id"].
"'");
339 $tpl->parseCurrentBlock();
341 $tpl->touchBlock(
"item");
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)
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 _getSelectedRecordsByObject($a_obj_type, $a_obj_id, $a_sub_type="")
Get selected records by object.
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.