diff --git a/js/components/ascribe_app.js b/js/components/ascribe_app.js
index 87ab1daf..4848c01a 100644
--- a/js/components/ascribe_app.js
+++ b/js/components/ascribe_app.js
@@ -21,6 +21,7 @@ let AscribeApp = React.createClass({
render() {
const { activeRoute, children, currentUser, routes, whitelabel } = this.props;
+ const Footer = activeRoute && activeRoute.footer;
return (
@@ -34,7 +35,7 @@ let AscribeApp = React.createClass({
{/* Routes are injected here */}
{children}
-
+ {Footer ? : null}
);
}
diff --git a/js/components/footer.js b/js/components/footer.js
index 3010da4d..ced01fb5 100644
--- a/js/components/footer.js
+++ b/js/components/footer.js
@@ -4,13 +4,10 @@ import React from 'react';
import { getLangText } from '../utils/lang_utils';
-let Footer = React.createClass({
- propTypes: {
- activeRoute: React.PropTypes.object.isRequired
- },
+const Footer = React.createClass({
render() {
- return !this.props.activeRoute.hideFooter ? (
+ return (
@@ -28,7 +25,7 @@ let Footer = React.createClass({
- ) : null;
+ );
}
});
diff --git a/js/components/whitelabel/prize/portfolioreview/pr_app.js b/js/components/whitelabel/prize/portfolioreview/pr_app.js
index d8b9f982..1639e750 100644
--- a/js/components/whitelabel/prize/portfolioreview/pr_app.js
+++ b/js/components/whitelabel/prize/portfolioreview/pr_app.js
@@ -35,6 +35,7 @@ let PRApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
+ const Footer = activeRoute && activeRoute.footer;
let style = {};
let header;
@@ -64,7 +65,7 @@ let PRApp = React.createClass({
{/* Routes are injected here */}
{children}
-
+ {Footer ? : null}
);
}
diff --git a/js/components/whitelabel/prize/prize_routes.js b/js/components/whitelabel/prize/prize_routes.js
index 79b64f29..f1f32772 100644
--- a/js/components/whitelabel/prize/prize_routes.js
+++ b/js/components/whitelabel/prize/prize_routes.js
@@ -35,115 +35,91 @@ const ROUTES = {
sluice: (
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLanding)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} />
+ headerTitle={getLangText('+ NEW WORK')} />
+ headerTitle={getLangText('COLLECTION')} />
+ component={SluicePieceContainer} />
+ component={EditionContainer} />
+ component={CoaVerifyContainer} />
+ component={ErrorNotFoundPage} />
),
portfolioreview: (
+ component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)} />
+ headerTitle={getLangText('SUBMISSIONS')} />
+ )(SPLoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ )(SPSignupContainer)} />
+ )(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} />
+ component={SPPieceContainer} />
+ component={EditionContainer} />
+ component={CoaVerifyContainer} />
+ component={ErrorNotFoundPage} />
)
};
diff --git a/js/components/whitelabel/prize/simple_prize/prize_app.js b/js/components/whitelabel/prize/simple_prize/prize_app.js
index 7e0facc9..dd1556c5 100644
--- a/js/components/whitelabel/prize/simple_prize/prize_app.js
+++ b/js/components/whitelabel/prize/simple_prize/prize_app.js
@@ -29,6 +29,7 @@ let PrizeApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
+ const Footer = activeRoute && activeRoute.footer;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute
@@ -52,7 +53,7 @@ let PrizeApp = React.createClass({
{/* Routes are injected here */}
{children}
-
+ {Footer ? : null}
);
}
diff --git a/js/components/whitelabel/wallet/wallet_app.js b/js/components/whitelabel/wallet/wallet_app.js
index 61e3327f..c40d075c 100644
--- a/js/components/whitelabel/wallet/wallet_app.js
+++ b/js/components/whitelabel/wallet/wallet_app.js
@@ -27,6 +27,7 @@ let WalletApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
+ const Footer = activeRoute && activeRoute.footer;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute
@@ -53,7 +54,7 @@ let WalletApp = React.createClass({
{/* Routes are injected here */}
{children}
-
+ {Footer ? : null}
);
}
diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js
index f7c60a88..75e59487 100644
--- a/js/components/whitelabel/wallet/wallet_routes.js
+++ b/js/components/whitelabel/wallet/wallet_routes.js
@@ -17,6 +17,7 @@ import EditionContainer from '../../../components/ascribe_detail/edition_contain
import SettingsContainer from '../../../components/ascribe_settings/settings_container';
import ContractSettings from '../../../components/ascribe_settings/contract_settings';
import ErrorNotFoundPage from '../../../components/error_not_found_page';
+import Footer from '../../../components/footer.js';
import CCRegisterPiece from './components/cc/cc_register_piece';
@@ -57,301 +58,235 @@ let ROUTES = {
'cyland': (
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
+ aclName='acl_wallet_submit' />
+ disableOn='noPieces' />
+ component={EditionContainer} />
+ component={CoaVerifyContainer} />
+ component={CylandPieceContainer} />
+ component={ErrorNotFoundPage} />
),
'cc': (
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
+ headerTitle={getLangText('+ NEW WORK')} />
+ disableOn='noPieces' />
+ component={PieceContainer} />
+ component={EditionContainer} />
+ component={CoaVerifyContainer} />
+ component={ErrorNotFoundPage} />
),
'ikonotv': (
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
+ aclName='acl_create_contractagreement' />
+ aclName='acl_wallet_submit' />
+ disableOn='noPieces' />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
+ component={IkonotvPieceContainer} />
+ component={EditionContainer} />
+ component={CoaVerifyContainer} />
+ component={ErrorNotFoundPage} />
),
'lumenus': (
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
+ aclName='acl_wallet_submit' />
+ disableOn='noPieces' />
+ component={MarketPieceContainer} />
+ component={MarketEditionContainer} />
+ component={CoaVerifyContainer} />
+ component={ErrorNotFoundPage} />
),
'23vivi': (
-
+
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
+ aclName='acl_wallet_submit' />
+ disableOn='noPieces' />
+ component={MarketPieceContainer} />
+ component={MarketEditionContainer} />
+ component={CoaVerifyContainer} />
+ component={ErrorNotFoundPage} />
),
'polline': (
diff --git a/js/routes.js b/js/routes.js
index cc76cb3a..6baba4de 100644
--- a/js/routes.js
+++ b/js/routes.js
@@ -25,6 +25,8 @@ import ErrorNotFoundPage from './components/error_not_found_page';
import RegisterPiece from './components/register_piece';
+import Footer from './components/footer';
+
import { ProxyHandler, AuthRedirect } from './components/ascribe_routes/proxy_handler';
import { getLangText } from './utils/lang_utils';
@@ -34,35 +36,47 @@ const COMMON_ROUTES = (
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
+ footer={Footer} />
+ headerTitle={getLangText('+ NEW WORK')}
+ footer={Footer} />
+ disableOn='noPieces'
+ footer={Footer} />
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
+ footer={Footer} />
-
-
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(LogoutContainer)}
+ footer={Footer} />
+
+
+ component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
+ footer={Footer} />
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
+ footer={Footer} />
-
-
+ component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
+ footer={Footer} />
+
+
);