summaryrefslogtreecommitdiffstats
path: root/web/react/components/admin_console/admin_controller.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/admin_console/admin_controller.jsx')
-rw-r--r--web/react/components/admin_console/admin_controller.jsx59
1 files changed, 59 insertions, 0 deletions
diff --git a/web/react/components/admin_console/admin_controller.jsx b/web/react/components/admin_console/admin_controller.jsx
new file mode 100644
index 000000000..bb43af802
--- /dev/null
+++ b/web/react/components/admin_console/admin_controller.jsx
@@ -0,0 +1,59 @@
+// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+var AdminSidebar = require('./admin_sidebar.jsx');
+var EmailTab = require('./email_settings.jsx');
+var JobsTab = require('./jobs_settings.jsx');
+var Navbar = require('../../components/navbar.jsx');
+
+export default class AdminController extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.selectTab = this.selectTab.bind(this);
+
+ this.state = {
+ selected: 'email_settings'
+ };
+ }
+
+ selectTab(tab) {
+ this.setState({selected: tab});
+ }
+
+ render() {
+ var tab = '';
+
+ if (this.state.selected === 'email_settings') {
+ tab = <EmailTab />;
+ } else if (this.state.selected === 'job_settings') {
+ tab = <JobsTab />;
+ }
+
+ return (
+ <div className='container-fluid'>
+ <div
+ className='sidebar--menu'
+ id='sidebar-menu'
+ />
+ <AdminSidebar
+ selected={this.state.selected}
+ selectTab={this.selectTab}
+ />
+ <div className='inner__wrap channel__wrap'>
+ <div className='row header'>
+ <Navbar teamDisplayName='Admin Console' />
+ </div>
+ <div className='row main'>
+ <div
+ id='app-content'
+ className='app__content admin'
+ >
+ {tab}
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
+} \ No newline at end of file