|
@@ -58,10 +58,9 @@ const PagePathNav = ({ pageId, pagePath, isPageForbidden }) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const GrowiSubNavigation = (props) => {
|
|
const GrowiSubNavigation = (props) => {
|
|
|
- const isPageForbidden = document.querySelector('#grw-subnav').getAttribute('data-is-forbidden-page') === 'true';
|
|
|
|
|
const { appContainer, pageContainer } = props;
|
|
const { appContainer, pageContainer } = props;
|
|
|
const {
|
|
const {
|
|
|
- pageId, path, createdAt, creator, updatedAt, revisionAuthor,
|
|
|
|
|
|
|
+ pageId, path, createdAt, creator, updatedAt, revisionAuthor, isForbidden: isPageForbidden,
|
|
|
} = pageContainer.state;
|
|
} = pageContainer.state;
|
|
|
|
|
|
|
|
const isPageNotFound = pageId == null;
|
|
const isPageNotFound = pageId == null;
|
|
@@ -70,16 +69,16 @@ const GrowiSubNavigation = (props) => {
|
|
|
// Display only the RevisionPath
|
|
// Display only the RevisionPath
|
|
|
if (isPageNotFound || isPageForbidden) {
|
|
if (isPageNotFound || isPageForbidden) {
|
|
|
return (
|
|
return (
|
|
|
- <div className="px-3 py-3 grw-subnavbar">
|
|
|
|
|
|
|
+ <div className="grw-subnavbar d-flex align-items-center justify-content-between">
|
|
|
<PagePathNav pageId={pageId} pagePath={path} isPageForbidden={isPageForbidden} />
|
|
<PagePathNav pageId={pageId} pagePath={path} isPageForbidden={isPageForbidden} />
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const additionalClassNames = ['grw-subnavbar'];
|
|
|
|
|
|
|
+ const additionalClassNames = [''];
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className={`d-flex align-items-center justify-content-between ${additionalClassNames.join(' ')}`}>
|
|
|
|
|
|
|
+ <div className={`grw-subnavbar d-flex align-items-center justify-content-between ${additionalClassNames.join(' ')}`}>
|
|
|
|
|
|
|
|
{/* Page Path */}
|
|
{/* Page Path */}
|
|
|
<div>
|
|
<div>
|
|
@@ -138,6 +137,8 @@ GrowiSubNavigation.propTypes = {
|
|
|
t: PropTypes.func.isRequired, // i18next
|
|
t: PropTypes.func.isRequired, // i18next
|
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
|
|
pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
|
|
|
|
|
+
|
|
|
|
|
+ isCompactMode: PropTypes.bool,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export default withTranslation()(GrowiSubNavigationWrapper);
|
|
export default withTranslation()(GrowiSubNavigationWrapper);
|