1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00

Merge branch 'AD-661-due-1208-implement-jury-rating-an' of bitbucket.org:ascribe/onion into AD-661-due-1208-implement-jury-rating-an

This commit is contained in:
Tim Daubenschütz 2015-08-26 18:05:22 +02:00
commit 8cc1f91a3a

View File

@ -54,13 +54,20 @@ let PrizePieceList = React.createClass({
}, },
render() { render() {
let orderParams = ['artist_name', 'title'];
if (this.state.currentUser.is_jury) {
orderParams = ['rating', 'title'];
}
if (this.state.currentUser.is_judge) {
orderParams = ['rating', 'title', 'selected'];
}
return ( return (
<div> <div>
<PieceList <PieceList
ref="list" ref="list"
redirectTo="register_piece" redirectTo="register_piece"
accordionListItemType={AccordionListItemPrize} accordionListItemType={AccordionListItemPrize}
orderParams={this.state.currentUser.is_jury ? ['rating', 'title'] : ['artist_name', 'title']} orderParams={orderParams}
orderBy={this.state.currentUser.is_jury ? 'rating' : null} orderBy={this.state.currentUser.is_jury ? 'rating' : null}
filterParams={null} filterParams={null}
customSubmitButton={this.getButtonSubmit()}/> customSubmitButton={this.getButtonSubmit()}/>