From 32bc4b0c698e331c3e16499d008bd2e353ebed4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 8 Dec 2015 16:43:45 +0100 Subject: [PATCH] Add custom styling for PR --- js/components/header.js | 7 --- .../components/pr_routes/pr_proxy_handler.js | 2 +- .../prize/portfolioreview/pr_app.js | 2 +- .../whitelabel/prize/prize_routes.js | 7 +-- .../components/prize_piece_list.js | 7 +-- .../portfolioreview_custom_style.scss | 55 ++++++++++++++++++- 6 files changed, 60 insertions(+), 20 deletions(-) diff --git a/js/components/header.js b/js/components/header.js index 6ca96433..285a1ed2 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -37,16 +37,9 @@ import { constructHead } from '../utils/dom_utils'; let Header = React.createClass({ propTypes: { - showAddWork: React.PropTypes.bool, routes: React.PropTypes.arrayOf(React.PropTypes.object) }, - getDefaultProps() { - return { - showAddWork: true - }; - }, - getInitialState() { return mergeOptions( WhitelabelStore.getState(), diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js b/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js index edaa6663..af2283bb 100644 --- a/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js +++ b/js/components/whitelabel/prize/portfolioreview/components/pr_routes/pr_proxy_handler.js @@ -13,7 +13,7 @@ export function AuthPrizeRoleRedirect({ to, when }) { return function(currentUser, query) { const exprToValidate = when - .map((role) => currentUser[role]) + .map(role => currentUser[role]) .reduce((a, b) => a || b); if(exprToValidate) { diff --git a/js/components/whitelabel/prize/portfolioreview/pr_app.js b/js/components/whitelabel/prize/portfolioreview/pr_app.js index cb40adb9..ef85bfd5 100644 --- a/js/components/whitelabel/prize/portfolioreview/pr_app.js +++ b/js/components/whitelabel/prize/portfolioreview/pr_app.js @@ -52,7 +52,7 @@ let PRApp = React.createClass({ header = ; style = { paddingTop: '0 !important' }; } else if(currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) { - header =
; + header =
; } else { style = { paddingTop: '0 !important' }; } diff --git a/js/components/whitelabel/prize/prize_routes.js b/js/components/whitelabel/prize/prize_routes.js index 896939ee..2608d46e 100644 --- a/js/components/whitelabel/prize/prize_routes.js +++ b/js/components/whitelabel/prize/prize_routes.js @@ -61,15 +61,14 @@ const ROUTES = { ), portfolioreview: ( - + + component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)}/> + headerTitle='SUBMISSIONS'/>