From 8bf35081c80a56051037d0bc374e9fec3fb9529e Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 10 Sep 2015 14:56:37 -0700 Subject: PLT-12 UI framework for admin console --- .../components/admin_console/admin_controller.jsx | 57 ++++ .../components/admin_console/admin_sidebar.jsx | 164 +++++++++++ .../components/admin_console/email_settings.jsx | 311 +++++++++++++++++++++ .../components/admin_console/jobs_settings.jsx | 183 ++++++++++++ .../components/admin_console/select_team_modal.jsx | 124 ++++++++ 5 files changed, 839 insertions(+) create mode 100644 web/react/components/admin_console/admin_controller.jsx create mode 100644 web/react/components/admin_console/admin_sidebar.jsx create mode 100644 web/react/components/admin_console/email_settings.jsx create mode 100644 web/react/components/admin_console/jobs_settings.jsx create mode 100644 web/react/components/admin_console/select_team_modal.jsx (limited to 'web/react/components/admin_console') 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..b069f6432 --- /dev/null +++ b/web/react/components/admin_console/admin_controller.jsx @@ -0,0 +1,57 @@ +// 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 = ; + } else if (this.state.selected === 'job_settings') { + tab = ; + } + + return ( +
+ +
+
+ +
+
+
+
+ {tab} +
+
+
+
+
+ ); + } +} \ No newline at end of file diff --git a/web/react/components/admin_console/admin_sidebar.jsx b/web/react/components/admin_console/admin_sidebar.jsx new file mode 100644 index 000000000..64a99b1f4 --- /dev/null +++ b/web/react/components/admin_console/admin_sidebar.jsx @@ -0,0 +1,164 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +var SidebarHeader = require('../sidebar_header.jsx'); + +export default class AdminSidebar extends React.Component { + constructor(props) { + super(props); + + this.isSelected = this.isSelected.bind(this); + this.handleClick = this.handleClick.bind(this); + + this.state = { + }; + } + + handleClick(name) { + this.props.selectTab(name); + } + + isSelected(name) { + if (this.props.selected === name) { + return 'active'; + } + + return ''; + } + + render() { + return ( +
+
+ + +
+
+ ); + } +} + +AdminSidebar.propTypes = { + selected: React.PropTypes.string, + selectTab: React.PropTypes.func +}; \ No newline at end of file diff --git a/web/react/components/admin_console/email_settings.jsx b/web/react/components/admin_console/email_settings.jsx new file mode 100644 index 000000000..59475dc94 --- /dev/null +++ b/web/react/components/admin_console/email_settings.jsx @@ -0,0 +1,311 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +export default class EmailSettings extends React.Component { + constructor(props) { + super(props); + + this.state = { + }; + } + + render() { + return ( +
+

{'Email Settings'}

+
+
+ +
+ + +

{'This is some sample help text for the Bypass Email field'}

+
+
+
+ +
+ +
+
{' This is some error text for the Bypass Email field'}
+
+

{'This is some sample help text for the SMTP username field'}

+
+
+
+ +
+ +
+
+
+ +
+ +
+ + {'Test Connection'} + +
{' Connection successful'}
+
{' Connection unsuccessful'}
+
+
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +

{'This is some sample help text for the Apple push server field'}

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ ); + } +} \ No newline at end of file diff --git a/web/react/components/admin_console/jobs_settings.jsx b/web/react/components/admin_console/jobs_settings.jsx new file mode 100644 index 000000000..c36d20df7 --- /dev/null +++ b/web/react/components/admin_console/jobs_settings.jsx @@ -0,0 +1,183 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +export default class Jobs extends React.Component { + constructor(props) { + super(props); + + this.state = { + }; + } + + render() { + return ( +
+

{' ************** JOB Settings'}

+
+
+ +
+ + +

{'This is some sample help text for the Bypass Email field'}

+
+
+
+ +
+ +
+
{' This is some error text for the Bypass Email field'}
+
+

{'This is some sample help text for the SMTP username field'}

+
+
+
+
+ +
+
+
+ +
+ +

{'This is some sample help text for the Apple push server field'}

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ ); + } +} \ No newline at end of file diff --git a/web/react/components/admin_console/select_team_modal.jsx b/web/react/components/admin_console/select_team_modal.jsx new file mode 100644 index 000000000..fa30de7b2 --- /dev/null +++ b/web/react/components/admin_console/select_team_modal.jsx @@ -0,0 +1,124 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +export default class SelectTeam extends React.Component { + constructor(props) { + super(props); + + this.state = { + }; + } + + render() { + return ( + + ); + } +} \ No newline at end of file -- cgit v1.2.3-1-g7c22