|
|
@@ -15,12 +15,25 @@ import PageCreator from './PageCreator';
|
|
|
import RevisionAuthor from './RevisionAuthor';
|
|
|
|
|
|
const GrowiSubNavigation = (props) => {
|
|
|
+ const isPageForbidden = document.querySelector('#grw-subnav').getAttribute('data-is-forbidden-page');
|
|
|
const { appContainer, pageContainer } = props;
|
|
|
- const path = pageContainer.path || '';
|
|
|
const {
|
|
|
- createdAt, creator, updatedAt, revisionAuthor,
|
|
|
+ path, createdAt, creator, updatedAt, revisionAuthor,
|
|
|
} = pageContainer.state;
|
|
|
|
|
|
+ // Display only the RevisionPath if the page is trash or forbidden
|
|
|
+ if (isTrashPage(path) || isPageForbidden) {
|
|
|
+ return (
|
|
|
+ <div className="d-flex align-items-center">
|
|
|
+ <div className="title-container mr-auto">
|
|
|
+ <h1>
|
|
|
+ <RevisionPath behaviorType={appContainer.config.behaviorType} pageId={pageContainer.state.pageId} pagePath={pageContainer.state.path} />
|
|
|
+ </h1>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
<div className="d-flex align-items-center">
|
|
|
|
|
|
@@ -29,8 +42,7 @@ const GrowiSubNavigation = (props) => {
|
|
|
<h1>
|
|
|
<RevisionPath behaviorType={appContainer.config.behaviorType} pageId={pageContainer.state.pageId} pagePath={pageContainer.state.path} />
|
|
|
</h1>
|
|
|
- {/* TODO hide this component at forbidden page */}
|
|
|
- {!isTrashPage(path) && <TagLabels />}
|
|
|
+ <TagLabels />
|
|
|
</div>
|
|
|
|
|
|
{/* Header Button */}
|