|
@@ -14,19 +14,20 @@ const AdminNavigation = (props) => {
|
|
|
// eslint-disable-next-line react/prop-types
|
|
// eslint-disable-next-line react/prop-types
|
|
|
const MenuLabel = ({ menu }) => {
|
|
const MenuLabel = ({ menu }) => {
|
|
|
switch (menu) {
|
|
switch (menu) {
|
|
|
- case 'app': return <><i className="icon-fw icon-settings"></i> { t('App Settings') }</>;
|
|
|
|
|
- case 'security': return <><i className="icon-fw icon-shield"></i> { t('security_settings') }</>;
|
|
|
|
|
- case 'markdown': return <><i className="icon-fw icon-note"></i> { t('Markdown Settings') }</>;
|
|
|
|
|
- case 'customize': return <><i className="icon-fw icon-wrench"></i> { t('Customize') }</>;
|
|
|
|
|
- case 'importer': return <><i className="icon-fw icon-cloud-upload"></i> { t('Import Data') }</>;
|
|
|
|
|
- case 'export': return <><i className="icon-fw icon-cloud-download"></i> { t('Export Archive Data') }</>;
|
|
|
|
|
- case 'notification': return <><i className="icon-fw icon-bell"></i> { t('External_Notification') }</>;
|
|
|
|
|
- // TODO change icon for legacy-external-notification by GW-5466
|
|
|
|
|
- case 'legacy-external-notification': return <> <i className="icon-fw icon-bell"></i>{ t('Legacy_External_Notification') }</>;
|
|
|
|
|
- case 'users': return <><i className="icon-fw icon-user"></i> { t('User_Management') }</>;
|
|
|
|
|
- case 'user-groups': return <><i className="icon-fw icon-people"></i> { t('UserGroup Management') }</>;
|
|
|
|
|
- case 'search': return <><i className="icon-fw icon-magnifier"></i> { t('Full Text Search Management') }</>;
|
|
|
|
|
- default: return <><i className="icon-fw icon-home"></i> { t('Wiki Management Home Page') }</>;
|
|
|
|
|
|
|
+ case 'app': return <><i className="icon-fw icon-settings"></i> { t('App Settings') }</>;
|
|
|
|
|
+ case 'security': return <><i className="icon-fw icon-shield"></i> { t('security_settings') }</>;
|
|
|
|
|
+ case 'markdown': return <><i className="icon-fw icon-note"></i> { t('Markdown Settings') }</>;
|
|
|
|
|
+ case 'customize': return <><i className="icon-fw icon-wrench"></i> { t('Customize') }</>;
|
|
|
|
|
+ case 'importer': return <><i className="icon-fw icon-cloud-upload"></i> { t('Import Data') }</>;
|
|
|
|
|
+ case 'export': return <><i className="icon-fw icon-cloud-download"></i> { t('Export Archive Data') }</>;
|
|
|
|
|
+ case 'notification': return <><i className="icon-fw icon-bell"></i> { t('External_Notification') }</>;
|
|
|
|
|
+ // TODO change icon for legacy-slack-integration by GW-5466
|
|
|
|
|
+ case 'legacy-slack-integration': return <> <i className="icon-fw icon-paper-plane"></i> { t('Legacy_Slack_Integration') }</>;
|
|
|
|
|
+ case 'slack-integration': return <><i className="icon-fw icon-paper-plane"></i> { t('slack_integration') }</>;
|
|
|
|
|
+ case 'users': return <><i className="icon-fw icon-user"></i> { t('User_Management') }</>;
|
|
|
|
|
+ case 'user-groups': return <><i className="icon-fw icon-people"></i> { t('UserGroup Management') }</>;
|
|
|
|
|
+ case 'search': return <><i className="icon-fw icon-magnifier"></i> { t('Full Text Search Management') }</>;
|
|
|
|
|
+ default: return <><i className="icon-fw icon-home"></i> { t('Wiki Management Home Page') }</>;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -63,7 +64,8 @@ const AdminNavigation = (props) => {
|
|
|
<MenuLink menu="importer" isListGroupItems isActive={isActiveMenu('/importer')} />
|
|
<MenuLink menu="importer" isListGroupItems isActive={isActiveMenu('/importer')} />
|
|
|
<MenuLink menu="export" isListGroupItems isActive={isActiveMenu('/export')} />
|
|
<MenuLink menu="export" isListGroupItems isActive={isActiveMenu('/export')} />
|
|
|
<MenuLink menu="notification" isListGroupItems isActive={isActiveMenu('/notification') || isActiveMenu('/global-notification')} />
|
|
<MenuLink menu="notification" isListGroupItems isActive={isActiveMenu('/notification') || isActiveMenu('/global-notification')} />
|
|
|
- <MenuLink menu="legacy-external-notification" isListGroupItems isActive={isActiveMenu('/legacy-external-notification')} />
|
|
|
|
|
|
|
+ <MenuLink menu="slack-integration" isListGroupItems isActive={isActiveMenu('/slack-integration')} />
|
|
|
|
|
+ <MenuLink menu="legacy-slack-integration" isListGroupItems isActive={isActiveMenu('/legacy-slack-integration')} />
|
|
|
<MenuLink menu="users" isListGroupItems isActive={isActiveMenu('/users')} />
|
|
<MenuLink menu="users" isListGroupItems isActive={isActiveMenu('/users')} />
|
|
|
<MenuLink menu="user-groups" isListGroupItems isActive={isActiveMenu('/user-groups')} />
|
|
<MenuLink menu="user-groups" isListGroupItems isActive={isActiveMenu('/user-groups')} />
|
|
|
<MenuLink menu="search" isListGroupItems isActive={isActiveMenu('/search')} />
|
|
<MenuLink menu="search" isListGroupItems isActive={isActiveMenu('/search')} />
|
|
@@ -90,17 +92,18 @@ const AdminNavigation = (props) => {
|
|
|
aria-expanded="false"
|
|
aria-expanded="false"
|
|
|
>
|
|
>
|
|
|
<span className="float-left">
|
|
<span className="float-left">
|
|
|
- {pathname === '/admin' && <MenuLabel menu="home" />}
|
|
|
|
|
- {isActiveMenu('/app') && <MenuLabel menu="app" />}
|
|
|
|
|
- {isActiveMenu('/security') && <MenuLabel menu="security" />}
|
|
|
|
|
- {isActiveMenu('/markdown') && <MenuLabel menu="markdown" />}
|
|
|
|
|
- {isActiveMenu('/customize') && <MenuLabel menu="customize" />}
|
|
|
|
|
- {isActiveMenu('/importer') && <MenuLabel menu="importer" />}
|
|
|
|
|
- {isActiveMenu('/export') && <MenuLabel menu="export" />}
|
|
|
|
|
|
|
+ {pathname === '/admin' && <MenuLabel menu="home" />}
|
|
|
|
|
+ {isActiveMenu('/app') && <MenuLabel menu="app" />}
|
|
|
|
|
+ {isActiveMenu('/security') && <MenuLabel menu="security" />}
|
|
|
|
|
+ {isActiveMenu('/markdown') && <MenuLabel menu="markdown" />}
|
|
|
|
|
+ {isActiveMenu('/customize') && <MenuLabel menu="customize" />}
|
|
|
|
|
+ {isActiveMenu('/importer') && <MenuLabel menu="importer" />}
|
|
|
|
|
+ {isActiveMenu('/export') && <MenuLabel menu="export" />}
|
|
|
{(isActiveMenu('/notification') || isActiveMenu('/global-notification')) && <MenuLabel menu="notification" />}
|
|
{(isActiveMenu('/notification') || isActiveMenu('/global-notification')) && <MenuLabel menu="notification" />}
|
|
|
- {isActiveMenu('/users') && <MenuLabel menu="users" />}
|
|
|
|
|
- {isActiveMenu('/user-groups') && <MenuLabel menu="user-groups" />}
|
|
|
|
|
- {isActiveMenu('/search') && <MenuLabel menu="search" />}
|
|
|
|
|
|
|
+ {isActiveMenu('/slack-integration') && <MenuLabel menu="slack-integration" />}
|
|
|
|
|
+ {isActiveMenu('/users') && <MenuLabel menu="users" />}
|
|
|
|
|
+ {isActiveMenu('/user-groups') && <MenuLabel menu="user-groups" />}
|
|
|
|
|
+ {isActiveMenu('/search') && <MenuLabel menu="search" />}
|
|
|
</span>
|
|
</span>
|
|
|
</button>
|
|
</button>
|
|
|
<div className="dropdown-menu" aria-labelledby="dropdown-admin-navigation">
|
|
<div className="dropdown-menu" aria-labelledby="dropdown-admin-navigation">
|