diff --git a/js/components/ascribe_accordion_list/accordion_list_item_piece.js b/js/components/ascribe_accordion_list/accordion_list_item_piece.js
index 65b6454c..e1271b0a 100644
--- a/js/components/ascribe_accordion_list/accordion_list_item_piece.js
+++ b/js/components/ascribe_accordion_list/accordion_list_item_piece.js
@@ -60,7 +60,8 @@ let AccordionListItemPiece = React.createClass({
}
subheading={
- {getLangText('by %s', this.props.piece.artist_name)}
+ {getLangText('by ')}
+ {this.props.artistName ? this.props.artistName : this.props.piece.artist_name}
}
subsubheading={this.props.subsubheading}
diff --git a/js/components/whitelabel/prize/actions/prize_rating_actions.js b/js/components/whitelabel/prize/actions/prize_rating_actions.js
index 536445f8..e36023a0 100644
--- a/js/components/whitelabel/prize/actions/prize_rating_actions.js
+++ b/js/components/whitelabel/prize/actions/prize_rating_actions.js
@@ -37,7 +37,6 @@ class PrizeRatingActions {
resolve(res);
})
.catch((err) => {
- console.logGlobal(err);
reject(err);
});
});
@@ -52,7 +51,6 @@ class PrizeRatingActions {
resolve(res);
})
.catch((err) => {
- console.logGlobal(err);
reject(err);
});
});
diff --git a/js/components/whitelabel/prize/components/ascribe_accordion_list/accordion_list_item_prize.js b/js/components/whitelabel/prize/components/ascribe_accordion_list/accordion_list_item_prize.js
index 0c41ca57..73c82ca4 100644
--- a/js/components/whitelabel/prize/components/ascribe_accordion_list/accordion_list_item_prize.js
+++ b/js/components/whitelabel/prize/components/ascribe_accordion_list/accordion_list_item_prize.js
@@ -69,7 +69,7 @@ let AccordionListItemPrize = React.createClass({
// jury and rating available
let rating = parseInt(this.props.content.ratings.rating, 10);
return (
-
+
:
+ this.props.content.artist_name;
return (
{this.props.content.date_created.split('-')[0]}
diff --git a/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js b/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js
index 175757d7..b41703e7 100644
--- a/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js
+++ b/js/components/whitelabel/prize/components/ascribe_detail/piece_container.js
@@ -80,6 +80,8 @@ let PieceContainer = React.createClass({
render() {
if('title' in this.state.piece) {
+ let artistName = this.state.currentUser.is_jury ?
+ : this.state.piece.artist_name;
return (
- {this.state.piece.title}
-
+ {this.state.piece.title}
+
@@ -121,18 +123,18 @@ let NavigationHeader = React.createClass({
},
render() {
- if (this.props.currentUser && this.props.currentUser.is_jury && this.props.piece.navigation) {
+ if (this.props.currentUser && this.props.piece.navigation) {
let nav = this.props.piece.navigation;
return (
-
+
Previous
-
+
Next
@@ -197,13 +199,11 @@ let PrizePieceRatings = React.createClass({
render(){
if (this.props.currentUser && this.props.currentUser.is_jury) {
return (
-
-
YOUR VOTE
- }
- value={
+
+
- }/>
+
- );
+ );
}
return null;
}
@@ -241,13 +241,13 @@ let PersonalNote = React.createClass({
handleSuccess={this.showNotification}>
+ placeholder={getLangText('Enter your comments...')}/>
@@ -256,7 +256,7 @@ let PersonalNote = React.createClass({
);
}
- return null;
+ return nul
}
});
diff --git a/js/components/whitelabel/prize/components/landing.js b/js/components/whitelabel/prize/components/landing.js
index 3a5dc47f..75cdff79 100644
--- a/js/components/whitelabel/prize/components/landing.js
+++ b/js/components/whitelabel/prize/components/landing.js
@@ -3,28 +3,39 @@
import React from 'react';
import Router from 'react-router';
+import PrizeActions from '../actions/prize_actions';
+import PrizeStore from '../stores/prize_store';
+
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
import UserStore from '../../../../stores/user_store';
import UserActions from '../../../../actions/user_actions';
+import { mergeOptions } from '../../../../utils/general_utils';
+
let Landing = React.createClass({
mixins: [Router.Navigation],
getInitialState() {
- return UserStore.getState();
+ return mergeOptions(
+ PrizeStore.getState(),
+ UserStore.getState()
+ );
},
componentDidMount() {
UserStore.listen(this.onChange);
UserActions.fetchCurrentUser();
+ PrizeStore.listen(this.onChange);
+ PrizeActions.fetchPrize();
},
componentWillUnmount() {
UserStore.unlisten(this.onChange);
+ PrizeStore.unlisten(this.onChange);
},
onChange(state) {
@@ -37,27 +48,61 @@ let Landing = React.createClass({
}
},
+ getButtons() {
+ if (this.state.prize && this.state.prize.active){
+ return (
+
+
+ Sign up to submit
+
+
+
+ or, already an ascribe user?
+
+
+ Log in to submit
+
+
+ );
+ }
+ return (
+
+
+ Sign up to ascribe
+
+
+
+ or, already an ascribe user?
+
+
+ Log in
+
+
+ );
+ },
+
+ getTitle() {
+ if (this.state.prize && this.state.prize.active){
+ return (
+
+ This is the submission page for Sluice_screens ↄc Prize 2015.
+
+ );
+ }
+ return (
+
+ Submissions for Sluice_screens ↄc Prize 2015 are now closed.
+
+ );
+ },
render() {
return (
Sluice_screens ↄc Prize 2015
-
- This is the submission page for Sluice_screens ↄc Prize 2015.
-
-
-
- Sign up to submit
-
-
-
- or, already an ascribe user?
-
-
- Log in to submit
-
-
+ {this.getTitle()}
+ {this.getButtons()}
diff --git a/js/components/whitelabel/prize/components/piece_list.js b/js/components/whitelabel/prize/components/piece_list.js
index 230bf7de..e63d2e01 100644
--- a/js/components/whitelabel/prize/components/piece_list.js
+++ b/js/components/whitelabel/prize/components/piece_list.js
@@ -3,21 +3,47 @@
import React from 'react';
import PieceList from '../../../piece_list';
+import PrizeActions from '../actions/prize_actions';
+import PrizeStore from '../stores/prize_store';
+
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
import AccordionListItemPrize from './ascribe_accordion_list/accordion_list_item_prize';
let PrizePieceList = React.createClass({
+ getInitialState() {
+ return PrizeStore.getState();
+ },
+
+ componentDidMount() {
+ PrizeStore.listen(this.onChange);
+ PrizeActions.fetchPrize();
+ },
+
+ componentWillUnmount() {
+ PrizeStore.unlisten(this.onChange);
+ },
+
+ onChange(state) {
+ this.setState(state);
+ },
+ getButtonSubmit() {
+ if (this.state.prize && this.state.prize.active){
+ return (
+
+ Submit to prize
+
+ );
+ }
+ return null;
+ },
+
render() {
return (
- Submit to prize
-
- }/>
+ customSubmitButton={this.getButtonSubmit()}/>
);
}
diff --git a/sass/main.scss b/sass/main.scss
index 4071e727..a657b002 100644
--- a/sass/main.scss
+++ b/sass/main.scss
@@ -386,6 +386,9 @@ hr {
.rating-container .rating-stars {
width: 25px;
+ color: #02b6a3;
+}
+#list-rating > a > span > span > .rating-container .rating-stars{
color: #000;
}
@@ -398,4 +401,11 @@ hr {
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
+}
+
+.link-ascribe {
+ color: #666;
+ &:hover {
+ color: #000;
+ }
}
\ No newline at end of file