diff options
author | Asaad Mahmood <asaadmahmoodspin@users.noreply.github.com> | 2016-06-03 00:33:52 +0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-06-02 12:33:52 -0700 |
commit | e0fca16b27b35d6d4303e5a76f10a689fdefcce3 (patch) | |
tree | d0043428b7cdf8b8173a51f1225cd167972b16bc /webapp/components/admin_console/admin_sidebar_section.jsx | |
parent | 2bb8206a7fa6c37c5712da5262937bd9bf708b89 (diff) | |
download | chat-e0fca16b27b35d6d4303e5a76f10a689fdefcce3.tar.gz chat-e0fca16b27b35d6d4303e5a76f10a689fdefcce3.tar.bz2 chat-e0fca16b27b35d6d4303e5a76f10a689fdefcce3.zip |
PLT-3010 - Updating system console (#3146)
* Updating system console
* Updating system console stuff
* Updating ldap settings
Diffstat (limited to 'webapp/components/admin_console/admin_sidebar_section.jsx')
-rw-r--r-- | webapp/components/admin_console/admin_sidebar_section.jsx | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/webapp/components/admin_console/admin_sidebar_section.jsx b/webapp/components/admin_console/admin_sidebar_section.jsx index 0492745ca..56e520629 100644 --- a/webapp/components/admin_console/admin_sidebar_section.jsx +++ b/webapp/components/admin_console/admin_sidebar_section.jsx @@ -10,6 +10,7 @@ export default class AdminSidebarSection extends React.Component { return { name: React.PropTypes.string.isRequired, title: React.PropTypes.node.isRequired, + type: React.PropTypes.string, parentLink: React.PropTypes.string, subsection: React.PropTypes.bool, children: React.PropTypes.arrayOf(React.PropTypes.element), @@ -59,20 +60,39 @@ export default class AdminSidebarSection extends React.Component { className += ' sidebar-subsection'; } - return ( - <li className={className}> - <Link + let sidebarItem = ( + <Link + className={`${className}-title`} + activeClassName={`${className}-title ${className}-title--active`} + onlyActiveOnIndex={this.props.onlyActiveOnIndex} + onClick={this.handleClick} + to={link} + > + <span className={`${className}-title__text`}> + {this.props.title} + </span> + {this.props.action} + </Link> + ); + + if (this.props.type === 'text') { + sidebarItem = ( + <div className={`${className}-title`} activeClassName={`${className}-title ${className}-title--active`} onlyActiveOnIndex={this.props.onlyActiveOnIndex} - onClick={this.handleClick} - to={link} > <span className={`${className}-title__text`}> {this.props.title} </span> {this.props.action} - </Link> + </div> + ); + } + + return ( + <li className={className}> + {sidebarItem} {clonedChildren} </li> ); |