From d24e867603fd253ea42050057896422beeba59db Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Fri, 18 Nov 2016 21:55:29 -0500 Subject: Move page list back out to the side menu, but with the new page form below the new page button like the new wiki form. Disable text editing if viewer lacks edit permission, and change the tab label to Source instead of Edit in that case. --- Zotlabs/Module/Wiki.php | 1 + 1 file changed, 1 insertion(+) (limited to 'Zotlabs/Module/Wiki.php') diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index edcd6ec58..45a0ab4d6 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -211,6 +211,7 @@ class Wiki extends \Zotlabs\Web\Controller { '$wikiheaderPage' => $wikiheaderPage, '$hideEditor' => $hide_editor, '$showPageControls' => $showPageControls, + '$editOrSourceLabel' => (($showPageControls) ? t('Edit') : t('Source')), '$tools_label' => 'Wiki Tools', '$showNewWikiButton'=> $showNewWikiButton, '$showNewPageButton'=> $showNewPageButton, -- cgit v1.2.3 From 16281c626b7db96e5af3e05179315b4f0dc33d1c Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Fri, 18 Nov 2016 22:10:55 -0500 Subject: Hide all content if no wiki is selected except for a message saying to choose one. --- Zotlabs/Module/Wiki.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Wiki.php') diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 45a0ab4d6..c4fa63673 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -128,7 +128,7 @@ class Wiki extends \Zotlabs\Web\Controller { require_once('library/markdown.php'); $content = t('"# Wiki Sandbox\n\nContent you **edit** and **preview** here *will not be saved*."'); $renderedContent = Markdown(json_decode($content)); - $hide_editor = false; + $hide_editor = true; $showPageControls = false; $showNewWikiButton = $wiki_owner; $showNewPageButton = false; @@ -209,7 +209,8 @@ class Wiki extends \Zotlabs\Web\Controller { $o .= replace_macros(get_markup_template('wiki.tpl'),array( '$wikiheaderName' => $wikiheaderName, '$wikiheaderPage' => $wikiheaderPage, - '$hideEditor' => $hide_editor, + '$hideEditor' => $hide_editor, // True will completely hide the content section and is used for the case of no wiki selected + '$chooseWikiMessage' => t('Choose an available wiki from the list on the left.'), '$showPageControls' => $showPageControls, '$editOrSourceLabel' => (($showPageControls) ? t('Edit') : t('Source')), '$tools_label' => 'Wiki Tools', -- cgit v1.2.3