diff --git a/packages/widgets/src/HeaderBar/HeaderBar.js b/packages/widgets/src/HeaderBar/HeaderBar.js
index e50f5e1cf1..ffba24b67f 100755
--- a/packages/widgets/src/HeaderBar/HeaderBar.js
+++ b/packages/widgets/src/HeaderBar/HeaderBar.js
@@ -18,6 +18,9 @@ const query = {
title: {
resource: 'systemSettings/applicationTitle',
},
+ help: {
+ resource: 'systemSettings/helpLink',
+ },
user: {
resource: 'me',
},
@@ -71,7 +74,7 @@ export const HeaderBar = ({ appName, className }) => {
userAuthorities={data.user.authorities}
/>
-
+
>
)}
diff --git a/packages/widgets/src/HeaderBar/HeaderBar.stories.js b/packages/widgets/src/HeaderBar/HeaderBar.stories.js
index e2c6ee3b47..b81ae8886b 100644
--- a/packages/widgets/src/HeaderBar/HeaderBar.stories.js
+++ b/packages/widgets/src/HeaderBar/HeaderBar.stories.js
@@ -13,6 +13,9 @@ const customData = {
'systemSettings/applicationTitle': {
applicationTitle: 'Foobar',
},
+ 'systemSettings/helpLink': {
+ helpLink: '//custom-help-link',
+ },
me: {
name: 'John Doe',
email: 'john_doe@dhis2.org',
diff --git a/packages/widgets/src/HeaderBar/Profile.js b/packages/widgets/src/HeaderBar/Profile.js
index 5c1908c280..fe836a81fa 100755
--- a/packages/widgets/src/HeaderBar/Profile.js
+++ b/packages/widgets/src/HeaderBar/Profile.js
@@ -58,7 +58,7 @@ export default class Profile extends React.Component {
}
render() {
- const { user, baseUrl } = this.props
+ const { user, baseUrl, helpUrl } = this.props
return (
) : null}
diff --git a/packages/widgets/src/HeaderBar/Profile/ProfileMenu.js b/packages/widgets/src/HeaderBar/Profile/ProfileMenu.js
index eb57104d9d..3eab1f80ed 100755
--- a/packages/widgets/src/HeaderBar/Profile/ProfileMenu.js
+++ b/packages/widgets/src/HeaderBar/Profile/ProfileMenu.js
@@ -23,7 +23,7 @@ const iconStyle = css.resolve`
}
`
-const getMenuList = () => [
+const getMenuList = (helpUrl) => [
{
icon: ,
label: i18n.t('Settings'),
@@ -40,8 +40,9 @@ const getMenuList = () => [
icon: ,
label: i18n.t('Help'),
value: 'help',
- link:
- 'https://docs.dhis2.org/master/en/user/html/dhis2_user_manual_en.html',
+ link: helpUrl
+ ? helpUrl
+ : 'https://docs.dhis2.org/master/en/user/html/dhis2_user_manual_en.html',
nobase: true,
},
{
@@ -58,7 +59,7 @@ const getMenuList = () => [
},
]
-const ProfileContents = ({ name, email, avatar }) => {
+const ProfileContents = ({ name, email, avatar, helpUrl }) => {
const { baseUrl } = useConfig()
return (
@@ -67,7 +68,7 @@ const ProfileContents = ({ name, email, avatar }) => {
- {getMenuList().map(
+ {getMenuList(helpUrl).map(
({ label, value, icon, link, nobase }) => (