Hide all content if no wiki is selected except for a message saying to choose one.

This commit is contained in:
Andrew Manning 2016-11-18 22:10:55 -05:00
parent d24e867603
commit 16281c626b
2 changed files with 9 additions and 3 deletions

View File

@ -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',

View File

@ -11,7 +11,12 @@
transition: opacity 0.5s 0.5s ease;
}
</style>
<div class="generic-content-wrapper">
{{if $hideEditor}}
<div>
<p class="lead text-center">{{$chooseWikiMessage}}</p>
</div>
{{/if}}
<div class="generic-content-wrapper" {{if $hideEditor}}style="display: none;"{{/if}}>
<div class="section-title-wrapper">
<div class="pull-right">