Commit c20ab811 authored by Carlos Tadeu Panato Junior's avatar Carlos Tadeu Panato Junior Committed by Joram Wilander

PLT-6695 - Mobile web view: Add "Create Team" option to main menu (#6524)

* PLT-6695 - Mobile web view: Add "Create Team" option to main menu

* change to isSystemAdmin
parent 940ba9c7
......@@ -173,6 +173,7 @@ export default class SidebarRightMenu extends React.Component {
let joinAnotherTeamLink;
let isAdmin = false;
let isSystemAdmin = false;
let createTeam = null;
if (currentUser != null) {
isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
......@@ -264,6 +265,25 @@ export default class SidebarRightMenu extends React.Component {
</li>
);
}
if (global.window.mm_config.EnableTeamCreation === 'true' || isSystemAdmin) {
createTeam = (
<li key='newTeam_li'>
<Link
id='createTeam'
key='newTeam_a'
to='/create_team'
onClick={this.handleClick}
>
<i className='icon fa fa-plus-square'/>
<FormattedMessage
id='navbar_dropdown.create'
defaultMessage='Create a New Team'
/>
</Link>
</li>
);
}
}
manageLink = (
......@@ -410,7 +430,7 @@ export default class SidebarRightMenu extends React.Component {
}
let teamDivider = null;
if (teamSettingsLink || manageLink || joinAnotherTeamLink) {
if (teamSettingsLink || manageLink || joinAnotherTeamLink || createTeam) {
teamDivider = <li className='divider'/>;
}
......@@ -480,6 +500,7 @@ export default class SidebarRightMenu extends React.Component {
{teamDivider}
{teamSettingsLink}
{manageLink}
{createTeam}
{joinAnotherTeamLink}
{consoleDivider}
{consoleLink}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment