Hide page history viewer when viewing sandbox
This commit is contained in:
parent
4528becf4c
commit
2af8105b46
@ -30,10 +30,10 @@ class Wiki extends \Zotlabs\Web\Controller {
|
|||||||
$wiki_owner = false;
|
$wiki_owner = false;
|
||||||
$showNewWikiButton = false;
|
$showNewWikiButton = false;
|
||||||
$showCommitMsg = false;
|
$showCommitMsg = false;
|
||||||
|
$hidePageHistory = false;
|
||||||
$pageHistory = array();
|
$pageHistory = array();
|
||||||
$local_observer = null;
|
$local_observer = null;
|
||||||
$resource_id = '';
|
$resource_id = '';
|
||||||
$pagename = '';
|
|
||||||
|
|
||||||
// init() should have forced the URL to redirect to /wiki/channel so assume argc() > 1
|
// init() should have forced the URL to redirect to /wiki/channel so assume argc() > 1
|
||||||
$nick = argv(1);
|
$nick = argv(1);
|
||||||
@ -78,6 +78,7 @@ class Wiki extends \Zotlabs\Web\Controller {
|
|||||||
$showPageControls = false;
|
$showPageControls = false;
|
||||||
$showNewWikiButton = $wiki_owner;
|
$showNewWikiButton = $wiki_owner;
|
||||||
$showNewPageButton = false;
|
$showNewPageButton = false;
|
||||||
|
$hidePageHistory = true;
|
||||||
$showCommitMsg = false;
|
$showCommitMsg = false;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
@ -116,6 +117,7 @@ class Wiki extends \Zotlabs\Web\Controller {
|
|||||||
$showPageControls = $wiki_owner;
|
$showPageControls = $wiki_owner;
|
||||||
$showNewWikiButton = $wiki_owner;
|
$showNewWikiButton = $wiki_owner;
|
||||||
$showNewPageButton = $wiki_owner;
|
$showNewPageButton = $wiki_owner;
|
||||||
|
$hidePageHistory = false;
|
||||||
$showCommitMsg = true;
|
$showCommitMsg = true;
|
||||||
$pageHistory = wiki_page_history(array('resource_id' => $resource_id, 'pageUrlName' => $pageUrlName));
|
$pageHistory = wiki_page_history(array('resource_id' => $resource_id, 'pageUrlName' => $pageUrlName));
|
||||||
break;
|
break;
|
||||||
@ -131,6 +133,7 @@ class Wiki extends \Zotlabs\Web\Controller {
|
|||||||
'$showPageControls' => $showPageControls,
|
'$showPageControls' => $showPageControls,
|
||||||
'$showNewWikiButton'=> $showNewWikiButton,
|
'$showNewWikiButton'=> $showNewWikiButton,
|
||||||
'$showNewPageButton'=> $showNewPageButton,
|
'$showNewPageButton'=> $showNewPageButton,
|
||||||
|
'$hidePageHistory' => $hidePageHistory,
|
||||||
'$showCommitMsg' => $showCommitMsg,
|
'$showCommitMsg' => $showCommitMsg,
|
||||||
'$channel' => $channel['channel_address'],
|
'$channel' => $channel['channel_address'],
|
||||||
'$resource_id' => $resource_id,
|
'$resource_id' => $resource_id,
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<ul class="nav nav-tabs" id="wiki-nav-tabs">
|
<ul class="nav nav-tabs" id="wiki-nav-tabs">
|
||||||
<li><a data-toggle="tab" href="#edit-pane">Edit</a></li>
|
<li><a data-toggle="tab" href="#edit-pane">Edit</a></li>
|
||||||
<li class="active"><a data-toggle="tab" href="#preview-pane" id="wiki-get-preview">Preview</a></li>
|
<li class="active"><a data-toggle="tab" href="#preview-pane" id="wiki-get-preview">Preview</a></li>
|
||||||
<li><a data-toggle="tab" href="#page-history-pane" id="wiki-get-history">History</a></li>
|
<li {{if $hidePageHistory}}style="display: none;"{{/if}}><a data-toggle="tab" href="#page-history-pane" id="wiki-get-history">History</a></li>
|
||||||
{{if $showPageControls}}
|
{{if $showPageControls}}
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Page <b class="caret"></b></a>
|
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Page <b class="caret"></b></a>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
{{$renderedContent}}
|
{{$renderedContent}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="page-history-pane" class="tab-pane fade">
|
<div id="page-history-pane" class="tab-pane fade" {{if $hidePageHistory}}style="display: none;"{{/if}}>
|
||||||
<div id="page-history-list" class="section-content-wrapper">
|
<div id="page-history-list" class="section-content-wrapper">
|
||||||
<table class="table-striped table-responsive table-hover" style="width: 100%;">
|
<table class="table-striped table-responsive table-hover" style="width: 100%;">
|
||||||
{{foreach $pageHistory as $commit}}
|
{{foreach $pageHistory as $commit}}
|
||||||
|
Reference in New Issue
Block a user