diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-06-08 13:46:34 +0200 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-06-08 07:46:34 -0400 |
commit | dc5e7b805c3c2ef140ed30a69079a3f6684d8a1b (patch) | |
tree | 78bb8acf04d774f5c91ed6074404e5ae8e7cd5ae | |
parent | 613a8736111456bf93ae09f6f8814dca1de187ed (diff) | |
download | chat-dc5e7b805c3c2ef140ed30a69079a3f6684d8a1b.tar.gz chat-dc5e7b805c3c2ef140ed30a69079a3f6684d8a1b.tar.bz2 chat-dc5e7b805c3c2ef140ed30a69079a3f6684d8a1b.zip |
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
-rw-r--r-- | webapp/components/sidebar_right_menu.jsx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/webapp/components/sidebar_right_menu.jsx b/webapp/components/sidebar_right_menu.jsx index 10f6bd7a5..6122f60e8 100644 --- a/webapp/components/sidebar_right_menu.jsx +++ b/webapp/components/sidebar_right_menu.jsx @@ -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} |