-
+
);
};
diff --git a/imports/client/views/org/admin/students/StudentView.js b/imports/client/views/org/admin/students/StudentView.js
index 95f8a94..8c07979 100644
--- a/imports/client/views/org/admin/students/StudentView.js
+++ b/imports/client/views/org/admin/students/StudentView.js
@@ -10,8 +10,6 @@ import { Navbar,Modal, Nav, NavItem,
NavDropdown, MenuItem, Breadcrumb, Button } from 'react-bootstrap';
import { StudentTable } from './view/StudentTable';
import { Header } from '../Header';
-import { AdminSidebar } from '../Sidebar'
-import { AdminBreadcrumb } from '../Breadcrumb'
import { UploadCsv } from './UploadCsv';
import { AddStudent } from './add/addStudent';
import { Students } from '/imports/collections/students/index';
@@ -51,35 +49,17 @@ export class StudentView extends Component {
}
});
return (
-
-
-
-
- {/*end sidebar*/}
-
-
-
-
+
);
};
diff --git a/imports/client/views/org/app/module/AdminAppLayout.js b/imports/client/views/org/app/module/AdminAppLayout.js
new file mode 100644
index 0000000..f9f16ec
--- /dev/null
+++ b/imports/client/views/org/app/module/AdminAppLayout.js
@@ -0,0 +1,52 @@
+import _ from 'lodash';
+import { Meteor } from 'meteor/meteor';
+import React, { Component } from 'react';
+import { Link } from 'react-router';
+import { Avatar } from '/imports/client/components/Avatar';
+import { Icon } from '/imports/client/components/Icon';
+import classNames from 'classnames';
+import { EnterModule } from '/imports/client/views/org/enter/module/index';
+// import { VerifyModule } from '/imports/client/views/verify/module/index';
+import { Navbar,Modal, Nav, NavItem,
+ Glyphicon, Collapse,
+ NavbarToggler, NavbarBrand,
+ NavLink, DropdownItem, DropdownToggle, DropdownMenu,
+ NavDropdown, MenuItem, Breadcrumb } from 'react-bootstrap';
+import { VerifyModule } from '/imports/client/views/verify/module/index'
+import { AdminModule } from '/imports/client/views/org/admin/app/Index'
+
+var Accordion = require('react-bootstrap').Accordion;
+var Panel = require('react-bootstrap').Panel;
+export class AdminAppLayout extends Component {
+
+ render() {
+ const {user, org} = this.props.data;
+ if(!user) {
+ return (
+
+ );
+ }else if(!user.isEmailVerified()) {
+ return (
+
+ );
+ }else if(user.role==='ADMIN'){
+ return(
+
+ );
+ }else{
+ return (
+ null
+ );
+ }
+ };
+
+};
diff --git a/imports/client/views/org/app/module/AppLayout.js b/imports/client/views/org/app/module/AppLayout.js
deleted file mode 100644
index 94d9cb0..0000000
--- a/imports/client/views/org/app/module/AppLayout.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import _ from 'lodash';
-import { Meteor } from 'meteor/meteor';
-import React, { Component } from 'react';
-import { Link } from 'react-router';
-import { Avatar } from '/imports/client/components/Avatar';
-import { Icon } from '/imports/client/components/Icon';
-import classNames from 'classnames';
-import { EnterModule } from '/imports/client/views/org/enter/module/index';
-// import { VerifyModule } from '/imports/client/views/verify/module/index';
-import { Navbar,Modal, Nav, NavItem,
- Glyphicon, Collapse,
- NavbarToggler, NavbarBrand,
- NavLink, DropdownItem, DropdownToggle, DropdownMenu,
- NavDropdown, MenuItem, Breadcrumb } from 'react-bootstrap';
-import { VerifyModule } from '/imports/client/views/verify/module/index'
-import { AdminAppLayout } from '/imports/client/views/org/admin/AdminLayout'
-
-var Accordion = require('react-bootstrap').Accordion;
-var Panel = require('react-bootstrap').Panel;
-export class AppLayout extends Component {
-
- render() {
- const {user, org} = this.props.data;
- if(!user) {
- return (
-
- );
- }else if(!user.isEmailVerified()) {
- return (
-
- );
- }else if(user.role==='ADMIN'){
- return(
-
- );
- }else{
- return (
- null
- );
- }
- };
-
-};
diff --git a/imports/client/views/org/app/module/Index.js b/imports/client/views/org/app/module/Index.js
index f60fc87..85c64c3 100644
--- a/imports/client/views/org/app/module/Index.js
+++ b/imports/client/views/org/app/module/Index.js
@@ -4,7 +4,7 @@ import {
compose,
composeAll
} from 'react-komposer';
-import { AppLayout } from './AppLayout';
+import { AdminAppLayout } from './AdminAppLayout';
import { Loading } from '/imports/client/components/Loading';
import { Users } from '/imports/collections/users/index';
@@ -45,7 +45,7 @@ const reduxTick = (props, onData) => {
};
-export const AppModule = composeAll(
+export const AdminAppModule = composeAll(
composeWithTracker(meteorTick, Loading),
compose(reduxTick, Loading),
-)(AppLayout);
+)(AdminAppLayout);
diff --git a/imports/client/views/org/app/module/navigation/AppNavigation.js b/imports/client/views/org/app/module/navigation/AppNavigation.js
deleted file mode 100644
index 8db04f8..0000000
--- a/imports/client/views/org/app/module/navigation/AppNavigation.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import React, { Component } from 'react';
-import { Navbar } from 'react-bootstrap';
-import { Link } from 'react-router';
-import {PublicNavigation} from './PublicNavigation.js';
-import {AuthenticatedNavigation} from './AuthenticatedNavigation.js';
-// import '/imports/client/assets/css/icons/icomoon/styles.css';
-// import '/imports/client/assets/css/bootstrap.css';
-// import '/imports/client/assets/css/core.css';
-// import '/imports/client/assets/css/components.css';
-// import '/imports/client/assets/css/colors.css';
-// import '/imports/client/assets/css/colors.css';
-export class AppNavigation extends Component {
-
- constructor(props) {
- super(props);
- this.state = {
-
- };
- };
-
- onUpdate(key, value) {
- this.setState({[key]: value});
- };
- render() {
- const {user} = this.props.data;
- if(user){
- return(
-
- )
- }else{
- return(
-
-
-
- Application Name
-
-
-
-
-
-
-
-
- )
- }
-
- return (
-
- );
- };
-
-};
diff --git a/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js b/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js
deleted file mode 100644
index d56a171..0000000
--- a/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js
+++ /dev/null
@@ -1,312 +0,0 @@
-import React, { Component } from 'react';
-import { browserHistory } from 'react-router';
-import { LinkContainer } from 'react-router-bootstrap';
-import { logout } from '/imports/client/app/utils/loginMethods';
-import { Navbar,Modal, Nav, NavItem,
- Glyphicon, Collapse,
- NavbarToggler, NavbarBrand,
- NavLink, DropdownItem, DropdownToggle, DropdownMenu,
- NavDropdown, MenuItem } from 'react-bootstrap';
-import { Meteor } from 'meteor/meteor';
-import $ from 'jquery';
-
-
-const handleLogout = () => Meteor.logout(() => browserHistory.push('/login'));
-
-export class AuthenticatedNavigation extends Component {
- constructor(props) {
- super(props);
- this.toggle = this.toggle.bind(this);
- this.changeBodyClass = this.changeBodyClass.bind(this);
- this.state = {
- dropdownOpen: false,
- burgerMenu: false
- };
- }
- toggle() {
- this.setState({
- dropdownOpen: !this.state.dropdownOpen
- });
- }
- changeBodyClass(){
- if(this.state.burgerMenu){
- $('body').addClass('sidebar-xs');
- this.setState({burgerMenu: false});
- }else{
- $('body').removeClass('sidebar-xs');
- this.setState({burgerMenu: true});
- }
- }
- render(){
- const {user, org} = this.props.data;
- return(
-
-
-
-
-
- YoungDesk
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
- Add full font overrides for popovers and tooltips
-
36 minutes ago
-
-
-
- -
-
-
-
-
Chris Arney created a new
Design branch
-
2 hours ago
-
-
-
- -
-
-
-
-
-
- -
-
-
-
- Have Carousel ignore keyboard events
-
Dec 12, 05:46
-
-
-
-
-
-
-
-
-
Hello {user.getFullName()}
-
logout()}
- >
- logout
-
-
-
-
-
- );
- }
-}
diff --git a/imports/client/views/org/app/module/navigation/AuthenticatedNavigation0.js b/imports/client/views/org/app/module/navigation/AuthenticatedNavigation0.js
deleted file mode 100644
index c9f37b6..0000000
--- a/imports/client/views/org/app/module/navigation/AuthenticatedNavigation0.js
+++ /dev/null
@@ -1,303 +0,0 @@
-import React, { Component } from 'react';
-import { browserHistory } from 'react-router';
-import { LinkContainer } from 'react-router-bootstrap';
-import { Nav, NavItem,
- NavDropdown, MenuItem } from 'react-bootstrap';
-import { Meteor } from 'meteor/meteor';
-
-const handleLogout = () => Meteor.logout(() => browserHistory.push('/login'));
-
-export class AuthenticatedNavigation extends Component {
- constructor(props) {
- super(props);
- this.state = {
-
- };
- };
-render(){
- const {user} = this.props.data;
- return(
-
-
-
-
-
-
-
-
- -
-
-
- Git updates
-
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
- Add full font overrides for popovers and tooltips
-
36 minutes ago
-
-
-
- -
-
-
-
-
Chris Arney created a new
Design branch
-
2 hours ago
-
-
-
- -
-
-
-
-
-
- -
-
-
-
- Have Carousel ignore keyboard events
-
Dec 12, 05:46
-
-
-
-
-
-
-
-
-
-
-
Hello {`${user.firstName} ${user.lastName}`}!
-
Online
-
-
- -
-
-
- Activity
-
-
-
-
-
-
-
- -
-
-
-
-
Taylor Swift mentioned you in a post "Angular JS. Tips and tricks"
-
4 minutes ago
-
-
-
- -
-
-
-
- Special offers have been sent to subscribed users by
Donna Gordon
-
36 minutes ago
-
-
-
- -
-
-
-
-
Chris Arney created a new
Design branch in
Limitless repository
-
2 hours ago
-
-
-
- -
-
-
-
- Shipping cost to the Netherlands has been reduced, database updated
-
Feb 8, 11:30
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
January, 2016 - 1320 new users, 3284 orders, $49,390 revenue
-
Feb 1, 05:46
-
-
-
-
-
-
- -
-
-
- Messages
-
-
-
-
-
-
-
- -
-
-

-
5
-
-
-
-
-
- -
-
-

-
4
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-);
-}
-}
diff --git a/imports/client/views/org/app/module/navigation/Loading.js b/imports/client/views/org/app/module/navigation/Loading.js
deleted file mode 100644
index c97a7eb..0000000
--- a/imports/client/views/org/app/module/navigation/Loading.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react';
-
-const Loading = () => (
-
-);
-
-export default Loading;
diff --git a/imports/client/views/org/app/module/navigation/PublicNavigation.js b/imports/client/views/org/app/module/navigation/PublicNavigation.js
deleted file mode 100644
index acfc745..0000000
--- a/imports/client/views/org/app/module/navigation/PublicNavigation.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import React, { Component } from 'react';
-import { LinkContainer } from 'react-router-bootstrap';
-import { setQueryParam } from '/imports/client/app/utils/setQueryParam';
-import { browserHistory } from 'react-router';
-import { Nav, NavItem } from 'react-bootstrap';
-
-
-export class PublicNavigation extends Component {
- constructor(props) {
- super(props);
- this.state = {
-
- };
- };
-render(){
- console.log(this.props);
- var mainSite = document.location.hostname.split( "." )[1];
- var signup = `http://${mainSite}/signup`;
- return(
-
- )
-}
-}
diff --git a/imports/client/views/org/app/module/navigation/index.js b/imports/client/views/org/app/module/navigation/index.js
deleted file mode 100644
index fbfa4d7..0000000
--- a/imports/client/views/org/app/module/navigation/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// import { InviteSignupController } from '/imports/client/views/invite/signup/index'
-import _ from 'lodash';
-import {
- composeWithTracker,
- compose,
- composeAll
- } from 'react-komposer';
-import { Loading } from '/imports/client/components/Loading';
-
-import { Orgs } from '/imports/collections/orgs/index';
-import { Users } from '/imports/collections/users/index';
-
-import { AppNavigation } from './AppNavigation';
-
-const meteorTick = (props, onData) => {
-
- const handles = [
- Meteor.subscribe('users.current'),
- Meteor.subscribe('orgs.current')
- ];
-
- if(_.every(handles, (handle) => (handle.ready()) )) {
- const user = Users.current();
- const org = Orgs.current();
- onData(null, {
- data: {
- user: user,
- org: org
- },
- });
- }
-
- return () => {
- _.each(handles, (handle) => handle.stop() );
- };
-};
-
-
-const reduxTick = (props, onData) => {
- onData(null, {
- data: {}
- });
-};
-
-
-export const AppNavigationController = composeAll(
- composeWithTracker(meteorTick, Loading),
- compose(reduxTick, Loading),
-)(AppNavigation);
diff --git a/imports/collections/users/index.js b/imports/collections/users/index.js
index 39c27f9..36271bc 100644
--- a/imports/collections/users/index.js
+++ b/imports/collections/users/index.js
@@ -27,6 +27,7 @@ class User {
};
getRole() {
+ return (this._id);
const org = Orgs.findOne({_id: this.orgId});
if(!org) return null;
const connection = _.find(org.users, {userId: this._id});