110 $ui_factory = $this->gui->ui()->factory();
111 $ui_renderer = $this->gui->ui()->renderer();
113 $tpl =
new ilTemplate(
"tpl.wiki_side_block_content.html",
true,
true,
"components/ILIAS/Wiki");
116 $ilCtrl->setParameterByClass(ilWikiPageGUI::class,
"wpg_id", $this->wpg_id);
120 "txt" =>
$lng->
txt(
"info_short"),
121 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"infoScreen")
126 "txt" =>
$lng->
txt(
"wiki_recent_changes"),
127 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"recentChanges")
130 foreach ($actions as
$a) {
144 "txt" =>
$lng->
txt(
"wiki_all_pages"),
145 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"allPages")
150 "txt" =>
$lng->
txt(
"wiki_new_pages"),
151 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"newPages")
156 "txt" =>
$lng->
txt(
"wiki_popular_pages"),
157 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"popularPages")
162 "txt" =>
$lng->
txt(
"wiki_orphaned_pages"),
163 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"orphanedPages")
169 foreach ($actions as $a) {
170 $dd_actions[] = $ui_factory->link()->standard(
175 $dd = $ui_factory->dropdown()->standard($dd_actions)->withLabel(
$lng->
txt(
"wiki_page_lists"));
185 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
189 $dd_actions[] = $ui_factory->link()->standard(
190 $lng->
txt(
"wiki_activate_page_rating"),
191 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"activateWikiPageRating")
194 $dd_actions[] = $ui_factory->link()->standard(
195 $lng->
txt(
"wiki_deactivate_page_rating"),
196 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deactivateWikiPageRating")
202 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
203 $ilAccess->checkAccess(
"edit_page_meta",
"", $this->ref_id)) {
207 $dd_actions[] = $ui_factory->link()->standard(
208 $lng->
txt(
"wiki_unhide_meta_adv_records"),
209 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unhideAdvancedMetaData")
214 if (($ilAccess->checkAccess(
"edit_content",
"", $this->ref_id) && !$this->
getPageObject()->getBlocked())
215 || $ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
217 $dd_actions[] = $ui_factory->link()->standard(
219 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"renameWikiPage")
226 $dd_actions[] = $ui_factory->link()->standard(
227 $lng->
txt(
"wiki_unblock_page"),
228 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unblockWikiPage")
231 $dd_actions[] = $ui_factory->link()->standard(
233 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"blockWikiPage")
242 $dd_actions[] = $ui_factory->link()->standard(
244 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deleteWikiPageConfirmationScreen")
249 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
251 $ilCtrl->setParameterByClass(ilWikiPageTemplateGUI::class,
"wpg_id", $this->
getPageObject()->
getId());
252 if (!$wpt->isPageTemplate($this->getPageObject()->getId())) {
253 $dd_actions[] = $ui_factory->link()->standard(
254 $lng->
txt(
"wiki_add_template"),
255 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"addPageTemplateFromPageAction")
258 $dd_actions[] = $ui_factory->link()->standard(
259 $lng->
txt(
"wiki_remove_template_status"),
260 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"removePageTemplateFromPageAction")
265 $dd = $ui_factory->dropdown()->standard($dd_actions)->withLabel(
$lng->
txt(
"wiki_page_actions"));
267 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
268 $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
287 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
289 "txt" =>
$lng->
txt(
"wiki_contributors"),
290 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"listContributors")
296 if (!$this->wiki->isCommentsExportPossible()) {
298 "txt" =>
$lng->
txt(
"wiki_html_export"),
299 "id" =>
"il_wiki_user_export",
300 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"initUserHTMLExport")
303 $this->
lng->loadLanguageModule(
"note");
304 $comments_helper = new \ILIAS\Notes\Export\ExportHelperGUI();
305 $comments_modal = $comments_helper->getCommentIncludeModalDialog(
306 $this->
lng->txt(
"wiki_html_export"),
307 $this->
lng->txt(
"note_html_export_include_comments"),
308 "il.Wiki.Pres.performHTMLExport();",
309 "il.Wiki.Pres.performHTMLExportWithComments();",
313 "txt" =>
$lng->
txt(
"wiki_html_export"),
314 "modal" => $comments_modal
320 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
322 "txt" =>
$lng->
txt(
"settings"),
323 "href" => $ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"editSettings")
325 } elseif ($ilAccess->checkAccess(
'statistics_read',
"", $this->ref_id)) {
327 "txt" =>
$lng->
txt(
"statistics"),
328 "href" => $ilCtrl->getLinkTargetByClass(array(
"ilobjwikigui",
"ilwikistatgui"),
"initial")
333 foreach ($actions as $a) {
335 if (($a[
"modal"] ??
"") !=
"") {
336 $signal = $a[
"modal"]->getShowSignal();
337 $onclick =
"$(document).trigger('" . $signal .
"', {'id': '" . $signal .
"','triggerer':$(this), 'options': JSON.parse('[]')}); return false;";
340 $modal_html .= $this->
ui->renderer()->render($a[
"modal"]);
345 if (($a[
"id"] ??
"") !=
"") {
353 return $tpl->
get() . $modal_html;
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupRating(int $a_wiki_id)
Lookup whether rating is activated.
touchBlock(string $block)
setVariable($variable, $value='')
Sets a variable value.
static lookupAdvancedMetadataHidden(int $a_page_id)
static _lookupStartPage(int $a_wiki_id)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
static check(string $a_perm, int $a_ref_id, string $a_cmd="")