From e0fca16b27b35d6d4303e5a76f10a689fdefcce3 Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaadmahmoodspin@users.noreply.github.com>
Date: Fri, 3 Jun 2016 00:33:52 +0500
Subject: PLT-3010 - Updating system console (#3146)

* Updating system console

* Updating system console stuff

* Updating ldap settings
---
 .../admin_console/admin_sidebar_section.jsx        | 32 ++++++++++++++++++----
 1 file changed, 26 insertions(+), 6 deletions(-)

(limited to 'webapp/components/admin_console/admin_sidebar_section.jsx')

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>
         );
-- 
cgit v1.2.3-1-g7c22

