// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. var UserStore = require('../stores/user_store.jsx'); var client = require('../utils/client.jsx'); var utils = require('../utils/utils.jsx'); export default class SidebarRightMenu extends React.Component { constructor(props) { super(props); this.handleLogoutClick = this.handleLogoutClick.bind(this); } handleLogoutClick(e) { e.preventDefault(); client.logout(); } render() { var teamLink = ''; var inviteLink = ''; var teamSettingsLink = ''; var manageLink = ''; var currentUser = UserStore.getCurrentUser(); var isAdmin = false; if (currentUser != null) { isAdmin = currentUser.roles.indexOf('admin') > -1; inviteLink = (
  • Invite New Member
  • ); if (this.props.teamType === 'O') { teamLink = (
  • Get Team Invite Link
  • ); } } if (isAdmin) { teamSettingsLink = (
  • Team Settings
  • ); manageLink = (
  • Manage Team
  • ); } var siteName = ''; if (global.window.config.SiteName != null) { siteName = global.window.config.SiteName; } var teamDisplayName = siteName; if (this.props.teamDisplayName) { teamDisplayName = this.props.teamDisplayName; } return (
    {teamDisplayName}
    ); } } SidebarRightMenu.propTypes = { teamType: React.PropTypes.string, teamDisplayName: React.PropTypes.string };