diff --git a/js/app.js b/js/app.js index 15942bb4..94b733cd 100644 --- a/js/app.js +++ b/js/app.js @@ -33,6 +33,7 @@ requests.defaults({ class AppGateway { start() { + console.log('start'); let subdomain = window.location.host.split('.')[0]; requests.get('whitelabel_settings', {'subdomain': subdomain}) .then(this.loadSubdomain.bind(this)) @@ -45,11 +46,13 @@ class AppGateway { this.load('prize'); } - loadDefault() { + loadDefault(error) { + console.log('Loading default app, error'. error); this.load('default'); } load(type) { + console.log('loading', type); Router.run(getRoutes(type), Router.HistoryLocation, (App) => { React.render( , diff --git a/js/components/ascribe_accordion_list/accordion_list.js b/js/components/ascribe_accordion_list/accordion_list.js index a1a1c88a..85084b5f 100644 --- a/js/components/ascribe_accordion_list/accordion_list.js +++ b/js/components/ascribe_accordion_list/accordion_list.js @@ -22,7 +22,7 @@ let AccordionList = React.createClass({ } else if(this.props.count === 0) { return (
-

{getLangText('We could not find any works related to you%s', '...')}

+

{getLangText('We could not find any works related to you...')}

{getLangText('To register one, click')} {getLangText('here')}!

); diff --git a/js/components/piece_list.js b/js/components/piece_list.js index dc329444..8acfd6bd 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -56,6 +56,30 @@ let PieceList = React.createClass({ this.state.orderAsc); }, + getPieceListToolbar() { + if (this.state.pieceListCount > 10) { + return ( + + ); + } + }, + + getPagination() { + let currentPage = parseInt(this.props.query.page, 10) || 1; + let totalPages = Math.ceil(this.state.pieceListCount / this.state.pageSize); + + if (this.state.pieceListCount > 10) { + return ( + + ); + } + }, + searchFor(searchTerm) { PieceListActions.fetchPieceList(1, this.state.pageSize, searchTerm, this.state.orderBy, this.state.orderAsc); this.transitionTo(this.getPathname(), {page: 1}); @@ -67,15 +91,11 @@ let PieceList = React.createClass({ }, render() { - let currentPage = parseInt(this.props.query.page, 10) || 1; - let totalPages = Math.ceil(this.state.pieceListCount / this.state.pageSize); let loadingElement = (); return (
- + {this.getPieceListToolbar()} - + {this.getPagination()}
); } diff --git a/js/components/whitelabel/prize/app.js b/js/components/whitelabel/prize/app.js index a59f57a6..0828faa4 100644 --- a/js/components/whitelabel/prize/app.js +++ b/js/components/whitelabel/prize/app.js @@ -16,9 +16,7 @@ let PrizeApp = React.createClass({ render() { let header = null; if (this.isActive('pieces')) { - header = ( -
- ); + header = null; } return ( diff --git a/js/components/whitelabel/prize/components/signup_container.js b/js/components/whitelabel/prize/components/signup_container.js index 379f86e7..4950dac7 100644 --- a/js/components/whitelabel/prize/components/signup_container.js +++ b/js/components/whitelabel/prize/components/signup_container.js @@ -23,9 +23,8 @@ let SignupContainer = React.createClass({ if (this.state.submitted){ return (
-
- {this.state.message} + {this.state.message}
); diff --git a/js/components/whitelabel/prize/routes.js b/js/components/whitelabel/prize/routes.js index 69f8e525..d9b88c14 100644 --- a/js/components/whitelabel/prize/routes.js +++ b/js/components/whitelabel/prize/routes.js @@ -7,6 +7,8 @@ import Landing from './components/landing'; import LoginContainer from './components/login_container'; import SignupContainer from './components/signup_container'; import PasswordResetContainer from '../../../components/password_reset_container'; +import RegisterPiece from '../../../components/register_piece'; +import PieceList from '../../../components/piece_list'; import App from './app'; import AppConstants from '../../../constants/application_constants'; @@ -23,6 +25,7 @@ function getRoutes(commonRoutes) { + ); }